improve ohmyposh config

This commit is contained in:
Laurent Le Houerou 2024-06-20 16:41:37 +04:00
parent 8906d74ccc
commit fee20129b9

View File

@ -34,8 +34,10 @@
"false": "p:red" "false": "p:red"
}, },
"transient_prompt": { "transient_prompt": {
"foreground": "p:text", "foreground": "p:text",
"template": "{{ now | date \"15:04:05\" }} {{ if gt .Code 0 }}<p:false></>{{ else }}<p:true>\u276f</>{{ end }} " "template": "{{ .PWD }} {{ now | date \"15:04:05\" }} {{ if gt .Code 0 }}<p:false></>{{ else }}<p:true></>{{ end }} "
}, },
"blocks": [ "blocks": [
{ {
@ -137,87 +139,33 @@
"type": "python" "type": "python"
}, },
{ {
"background": "#AE1401", "background": "p:yellow",
"foreground": "#ffffff", "foreground": "p:text",
"invert_powerline": true, "invert_powerline": true,
"powerline_symbol": "\ue0b2", "powerline_symbol": "",
"properties": { "style": "accordion",
"display_mode": "files", "template": "  ",
"fetch_version": true
},
"style": "powerline",
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \ue791 ",
"type": "ruby"
},
{
"background": "#FEAC19",
"foreground": "#ffffff",
"invert_powerline": true,
"powerline_symbol": "\ue0b2",
"properties": {
"display_mode": "files",
"fetch_version": false
},
"style": "powerline",
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \uf0e7",
"type": "azfunc"
},
{
"background_templates": [
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
],
"foreground": "#ffffff",
"invert_powerline": true,
"powerline_symbol": "\ue0b2",
"properties": {
"display_default": false
},
"style": "powerline",
"template": " {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} \ue7ad ",
"type": "aws"
},
{
"background": "#ffff66",
"foreground": "#111111",
"invert_powerline": true,
"powerline_symbol": "\ue0b2",
"style": "powerline",
"template": " \uf0ad ",
"type": "root" "type": "root"
}, },
{ {
"background": "#c4a000", "background": "p:surface0",
"foreground": "#000000",
"invert_powerline": true,
"powerline_symbol": "\ue0b2",
"style": "powerline",
"template": " {{ .FormattedMs }} \uf252 ",
"type": "executiontime"
},
{
"background": "#000000",
"background_templates": [ "background_templates": [
"{{ if gt .Code 0 }}#cc2222{{ end }}" "{{ if gt .Code 0 }}p:red{{ end }}"
],
"foreground": "p:text",
"foreground_templates": [
"{{ if gt .Code 0 }}p:surface0{{ end }}"
], ],
"foreground": "#d3d7cf",
"invert_powerline": true, "invert_powerline": true,
"powerline_symbol": "\ue0b2", "powerline_symbol": "",
"properties": { "properties": {
"always_enabled": true "always_enabled": true
}, },
"style": "powerline",
"template": " {{ if gt .Code 0 }}{{ reason .Code }}{{ else }}\uf42e{{ end }} ",
"type": "status"
},
{
"background": "#d3d7cf",
"foreground": "#000000",
"invert_powerline": true,
"style": "diamond", "style": "diamond",
"template": " {{ .CurrentDate | date .Format }} \uf017 ", "template": " {{ if gt .Code 0 }}{{ reason .Code }}{{ else }}{{ end }} ",
"trailing_diamond": "", "type": "status",
"type": "time" "trailing_diamond": ""
} }
], ],
"type": "prompt" "type": "prompt"
@ -227,7 +175,7 @@
"newline": true, "newline": true,
"segments": [ "segments": [
{ {
"foreground": "#d3d7cf", "foreground": "p:text",
"style": "plain", "style": "plain",
"template": "", "template": "",
"type": "text" "type": "text"