From 9f965f7be3d3fdf72439520acca58fb4a12467e7 Mon Sep 17 00:00:00 2001 From: Caleb Braaten Date: Mon, 15 Jul 2024 23:23:26 -0700 Subject: [PATCH] Migrate JSON to TOML --- zsh/.config/oh-my-posh/theme.json | 71 ---------------------------- zsh/.config/oh-my-posh/theme.toml | 78 +++++++++++++++++++++++++++++++ zsh/.zshrc | 2 +- 3 files changed, 79 insertions(+), 72 deletions(-) delete mode 100644 zsh/.config/oh-my-posh/theme.json create mode 100644 zsh/.config/oh-my-posh/theme.toml diff --git a/zsh/.config/oh-my-posh/theme.json b/zsh/.config/oh-my-posh/theme.json deleted file mode 100644 index e9998e1..0000000 --- a/zsh/.config/oh-my-posh/theme.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", - "palette": { - "os": "#ACB0BE", - "pink": "#F5BDE6", - "lavender": "#B7BDF8", - "blue": "#8AADF4", - "wight": "#FFFFFF", - "text": "#494D64" - }, - "blocks": [ - { - "alignment": "left", - "segments": [ - { - "background": "p:blue", - "foreground": "p:wight", - "powerline_symbol": "\ue0b4", - "leading_diamond": "\ue0b6", - "style": "diamond", - "template": "{{.Icon}} ", - "type": "os" - }, - { - "background": "p:blue", - "foreground": "p:text", - "powerline_symbol": "\ue0b4", - "style": "diamond", - "template": "{{ .UserName }}@{{ .HostName }}", - "type": "session" - }, - { - "background": "p:pink", - "foreground": "p:text", - "properties": { - "folder_icon": "..\ue5fe..", - "home_icon": "~", - "style": "agnoster_short" - }, - "powerline_symbol": "\ue0b4", - "style": "powerline", - "template": " {{ .Path }}", - "type": "path" - }, - { - "background": "p:lavender", - "foreground": "p:text", - "style": "powerline", - "properties": { - "branch_icon": "\ue725 ", - "cherry_pick_icon": "\ue29b ", - "commit_icon": "\uf417 ", - "fetch_status": false, - "fetch_upstream_icon": false, - "merge_icon": "\ue727 ", - "no_commits_icon": "\uf0c3 ", - "rebase_icon": "\ue728 ", - "revert_icon": "\uf0e2 ", - "tag_icon": "\uf412 " - }, - "powerline_symbol": "\ue0b4", - "template": " {{ .HEAD }}", - "type": "git" - } - ], - "type": "prompt" - } - ], - "final_space": true, - "version": 2 -} diff --git a/zsh/.config/oh-my-posh/theme.toml b/zsh/.config/oh-my-posh/theme.toml new file mode 100644 index 0000000..acb2662 --- /dev/null +++ b/zsh/.config/oh-my-posh/theme.toml @@ -0,0 +1,78 @@ +#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json + +version = 2 +final_space = true + +[[blocks]] + type = 'prompt' + alignment = 'left' + + [[blocks.segments]] + type = 'os' + style = 'diamond' + powerline_symbol = '' + leading_diamond = '' + template = '{{.Icon}} ' + background = 'p:blue' + foreground = 'p:wight' + Text = '' + Duration = 0 + NameLength = 0 + + [[blocks.segments]] + type = 'session' + style = 'diamond' + powerline_symbol = '' + template = '{{ .UserName }}@{{ .HostName }}' + background = 'p:blue' + foreground = 'p:text' + Text = '' + Duration = 0 + NameLength = 0 + + [[blocks.segments]] + type = 'path' + style = 'powerline' + powerline_symbol = '' + template = ' {{ .Path }}' + background = 'p:pink' + foreground = 'p:text' + Text = '' + Duration = 0 + NameLength = 0 + + [blocks.segments.properties] + folder_icon = '....' + home_icon = '~' + style = 'agnoster_short' + + [[blocks.segments]] + type = 'git' + style = 'powerline' + powerline_symbol = '' + template = ' {{ .HEAD }}' + background = 'p:lavender' + foreground = 'p:text' + Text = '' + Duration = 0 + NameLength = 0 + + [blocks.segments.properties] + branch_icon = ' ' + cherry_pick_icon = ' ' + commit_icon = ' ' + fetch_status = false + fetch_upstream_icon = false + merge_icon = ' ' + no_commits_icon = ' ' + rebase_icon = ' ' + revert_icon = ' ' + tag_icon = ' ' + +[palette] + blue = '#8AADF4' + lavender = '#B7BDF8' + os = '#ACB0BE' + pink = '#F5BDE6' + text = '#494D64' + wight = '#FFFFFF' diff --git a/zsh/.zshrc b/zsh/.zshrc index d8a258e..51e7b70 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -28,7 +28,7 @@ export PATH="/opt/homebrew/opt/libpq/bin:$PATH" # ---- Oh-My-Posh ---- if [ "$TERM_PROGRAM" != "Apple_Terminal" ]; then - eval "$(oh-my-posh init zsh --config ~/.config/oh-my-posh/theme.json)" + eval "$(oh-my-posh init zsh --config ~/.config/oh-my-posh/theme.toml)" fi # ---- Zoxide (better cd) ----