From f8d0f60e10bf3ef255b58965da69cceaa2f4f971 Mon Sep 17 00:00:00 2001 From: Niccolo Borgioli Date: Mon, 6 Mar 2023 13:25:38 +0100 Subject: [PATCH] omg config --- files/fish/config.fish | 2 +- files/omp/main.omp.yaml | 102 +++++++++++++++++++++++ files/omp/powerlevel10k_modern.omp.json | 104 ------------------------ 3 files changed, 103 insertions(+), 105 deletions(-) create mode 100644 files/omp/main.omp.yaml delete mode 100644 files/omp/powerlevel10k_modern.omp.json diff --git a/files/fish/config.fish b/files/fish/config.fish index c72338f..8749ff5 100644 --- a/files/fish/config.fish +++ b/files/fish/config.fish @@ -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 diff --git a/files/omp/main.omp.yaml b/files/omp/main.omp.yaml new file mode 100644 index 0000000..cd979a5 --- /dev/null +++ b/files/omp/main.omp.yaml @@ -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 }} " + type: python + - background: "#7FD5EA" + foreground: "#ffffff" + leading_diamond: "" + style: diamond + template: " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + type: go + - background: "#7FD5EA" + foreground: "#000000" + leading_diamond: "" + style: diamond + template: " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " + 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 diff --git a/files/omp/powerlevel10k_modern.omp.json b/files/omp/powerlevel10k_modern.omp.json deleted file mode 100644 index 5b8d7a7..0000000 --- a/files/omp/powerlevel10k_modern.omp.json +++ /dev/null @@ -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 }} \ue0b6", - "type": "python" - }, - { - "background": "#7FD5EA", - "foreground": "#ffffff", - "leading_diamond": "\ue0b6", - "style": "diamond", - "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \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 -}