diff --git a/.config/ohmyposh/config.toml b/.config/ohmyposh/config.toml index 5551df3..75bbe60 100644 --- a/.config/ohmyposh/config.toml +++ b/.config/ohmyposh/config.toml @@ -1,8 +1,11 @@ -#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json - -version = 2 -final_space = true console_title_template = '{{ .PWD }}' +version = 3 +final_space = true + +[transient_prompt] + template = '❱ ' + background = 'transparent' + foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{ if eq .Code 0}}magenta{{end}}'] [[blocks]] type = 'prompt' @@ -10,24 +13,26 @@ console_title_template = '{{ .PWD }}' newline = true [[blocks.segments]] + template = '{{ .Path }}' + foreground = 'blue' + background = 'transparent' type = 'path' style = 'plain' - background = 'transparent' - foreground = 'blue' - template = '{{ .Path }}' [blocks.segments.properties] + cache_duration = 'none' style = 'full' [[blocks.segments]] + template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ .Behind }}{{ end }}{{ if gt .Ahead 0 }}⇡{{ .Ahead }}{{ end }}' + foreground = '#2ac3de' + background = 'transparent' type = 'git' style = 'plain' - background = 'transparent' - foreground = '#2ac3de' - template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ .Behind }}{{ end }}{{ if gt .Ahead 0 }}⇡{{ .Ahead }}{{ end }}' [blocks.segments.properties] branch_icon = '' + cache_duration = 'none' commit_icon = '@' fetch_status = true @@ -37,19 +42,11 @@ console_title_template = '{{ .PWD }}' newline = true [[blocks.segments]] + template = '❱' + background = 'transparent' type = 'text' style = 'plain' - foreground_templates = [ - '{{if gt .Code 0}}red{{end}}', - '{{ if eq .Code 0}}magenta{{end}}', - ] - background = 'transparent' - template = '❱' + foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{ if eq .Code 0}}magenta{{end}}'] -[transient_prompt] - foreground_templates = [ - '{{if gt .Code 0}}red{{end}}', - '{{ if eq .Code 0}}magenta{{end}}', - ] - background = 'transparent' - template = '❱ ' + [blocks.segments.properties] + cache_duration = 'none'