omg config

This commit is contained in:
Niccolo Borgioli 2023-03-06 13:25:38 +01:00
parent 8fe07eb52f
commit f8d0f60e10
No known key found for this signature in database
GPG Key ID: D93C615F75EE4F0B
3 changed files with 103 additions and 105 deletions

View File

@ -24,4 +24,4 @@ set -gx PNPM_HOME "$HOME/Library/pnpm"
set -gx PATH "$PNPM_HOME" $PATH
# pnpm end
oh-my-posh init fish --config ~/.config/omp/powerlevel10k_modern.omp.json | source
oh-my-posh init fish --config ~/.config/omp/main.omp.yaml | source

102
files/omp/main.omp.yaml Normal file
View File

@ -0,0 +1,102 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version: 2
common:
diamond: &diamond
style: diamond
leading_diamond: ""
# trailing_diamond: ""
powerline: &powerline
style: powerline
powerline_symbol: ""
blocks:
- alignment: left
segments:
- <<: *diamond
background: "#ffffff"
foreground: "#000000"
template: "{{ if .WSL }}WSL at {{ end }}{{.Icon}}"
type: os
- <<: *powerline
type: root
properties:
style: full
template: "  "
background: "#0000ff"
foreground: "#000000"
- <<: *powerline
type: path
properties:
style: full
template: " {{ .Path }} "
background: "#0000ff"
foreground: "#ffffff"
- <<: *powerline
type: git
template: " {{ .HEAD }} "
background: "#D4E157"
foreground: "#000000"
type: prompt
- alignment: right
segments:
# ENVS
- background: "#7FD5EA"
foreground: "#000000"
leading_diamond: ""
style: diamond
template:
" {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{
end }}{{ .Full }}{{ end }} <transparent></>"
type: python
- background: "#7FD5EA"
foreground: "#ffffff"
leading_diamond: ""
style: diamond
template: " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} <transparent></>"
type: go
- background: "#7FD5EA"
foreground: "#000000"
leading_diamond: ""
style: diamond
template: " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} <transparent></>"
type: node
- <<: *powerline
type: kubectl
# UTILITY
- <<: *diamond
type: shell
background: "#D4E157"
foreground: "#000000"
template: "{{ .Name }}"
- <<: *powerline
type: executiontime
properties:
style: round
threshold: 1
background: "#82eeff"
foreground: "#000000"
- <<: *powerline
background: "#ffffff"
foreground: "#000000"
properties:
time_format: "15:04:05"
template: " {{ .CurrentDate | date .Format }} "
type: time
type: prompt
- alignment: left
newline: true
segments:
- foreground: "#D4E157"
foreground_templates:
- "{{ if gt .Code 0 }}#FF5252{{ end }}"
properties:
always_enabled: true
style: plain
template: " "
type: exit
type: prompt

View File

@ -1,104 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#ffffff",
"foreground": "#000000",
"leading_diamond": "\ue0b6",
"style": "diamond",
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ",
"trailing_diamond": "\ue0b4",
"type": "os"
},
{
"background": "#0000ff",
"foreground": "#000000",
"powerline_symbol": "\ue0b4",
"properties": {
"style": "full"
},
"style": "powerline",
"template": " \uf0e7 ",
"type": "root"
},
{
"background": "#0000ff",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b4",
"properties": {
"style": "full"
},
"style": "powerline",
"template": " {{ .Path }} ",
"type": "path"
},
{
"background": "#D4E157",
"foreground": "#000000",
"powerline_symbol": "\ue0b4",
"style": "powerline",
"template": " {{ .HEAD }} ",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
{
"background": "#D4E157",
"foreground": "#000000",
"leading_diamond": "\ue0b6",
"style": "diamond",
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} <transparent>\ue0b6</>",
"type": "python"
},
{
"background": "#7FD5EA",
"foreground": "#ffffff",
"leading_diamond": "\ue0b6",
"style": "diamond",
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} <transparent>\ue0b6</>",
"type": "go"
},
{
"background": "#ffffff",
"foreground": "#000000",
"leading_diamond": "\ue0b6",
"properties": {
"time_format": "15:04:05"
},
"style": "diamond",
"template": " {{ .CurrentDate | date .Format }} ",
"trailing_diamond": "\ue0b4",
"type": "time"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#D4E157",
"foreground_templates": [
"{{ if gt .Code 0 }}#FF5252{{ end }}"
],
"properties": {
"always_enabled": true
},
"style": "plain",
"template": "\u276f ",
"type": "exit"
}
],
"type": "prompt"
}
],
"version": 2
}