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"
},
"transient_prompt": {
"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": [
{
@ -137,87 +139,33 @@
"type": "python"
},
{
"background": "#AE1401",
"foreground": "#ffffff",
"background": "p:yellow",
"foreground": "p:text",
"invert_powerline": true,
"powerline_symbol": "\ue0b2",
"properties": {
"display_mode": "files",
"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 ",
"powerline_symbol": "",
"style": "accordion",
"template": "  ",
"type": "root"
},
{
"background": "#c4a000",
"foreground": "#000000",
"invert_powerline": true,
"powerline_symbol": "\ue0b2",
"style": "powerline",
"template": " {{ .FormattedMs }} \uf252 ",
"type": "executiontime"
},
{
"background": "#000000",
"background": "p:surface0",
"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,
"powerline_symbol": "\ue0b2",
"powerline_symbol": "",
"properties": {
"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",
"template": " {{ .CurrentDate | date .Format }} \uf017 ",
"trailing_diamond": "",
"type": "time"
"template": " {{ if gt .Code 0 }}{{ reason .Code }}{{ else }}{{ end }} ",
"type": "status",
"trailing_diamond": ""
}
],
"type": "prompt"
@ -227,7 +175,7 @@
"newline": true,
"segments": [
{
"foreground": "#d3d7cf",
"foreground": "p:text",
"style": "plain",
"template": "",
"type": "text"