mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
e6d4413ae7
BREAKING CHANGE: adjusts the way some segment work for templates. Mapping the var names as following will resolve the issue. - session/title/general purpose - .Host -> .HostName - .User -> .UserName - az - .UserName -> .Name - kubectl - .UserName -> .User
130 lines
3.5 KiB
JSON
130 lines
3.5 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"segments": [
|
|
{
|
|
"type": "os",
|
|
"style": "diamond",
|
|
"foreground": "#26C6DA",
|
|
"background": "#546E7A",
|
|
"properties": {
|
|
"postfix": " \uE0B1",
|
|
"macos": "mac"
|
|
},
|
|
"leading_diamond": "\uE0c5",
|
|
"trailing_diamond": "\uE0B0"
|
|
},
|
|
{
|
|
"type": "session",
|
|
"style": "powerline",
|
|
"foreground": "#26C6DA",
|
|
"background": "#546E7A",
|
|
"powerline_symbol": "\uE0B0",
|
|
"properties": {
|
|
"template": "{{ .UserName }}@{{ .HostName }}"
|
|
}
|
|
},
|
|
{
|
|
"type": "battery",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\uE0B0",
|
|
"foreground": "#193549",
|
|
"background": "#a2beef",
|
|
"background_templates": [
|
|
"{{if eq \"Charging\" .State.String}}#00D100{{end}}",
|
|
"{{if eq \"Discharging\" .State.String}}#FFCD58{{end}}",
|
|
"{{if eq \"Full\" .State.String}}#0476d0{{end}}"
|
|
],
|
|
"properties": {
|
|
"postfix": "\uF295 \uf583 "
|
|
}
|
|
},
|
|
{
|
|
"type": "path",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\uE0B0",
|
|
"foreground": "#193549",
|
|
"background": "#14c2dd",
|
|
"properties": {
|
|
"prefix": " \uE5FF ",
|
|
"style": "folder"
|
|
}
|
|
},
|
|
{
|
|
"type": "git",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\uE0B0",
|
|
"foreground": "#193549",
|
|
"background": "#a2c4e0",
|
|
"properties": {
|
|
"fetch_stash_count": true,
|
|
"fetch_upstream_icon": true,
|
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\uE0B0",
|
|
"foreground": "#ffffff",
|
|
"background": "#6CA35E",
|
|
"properties": {
|
|
"prefix": " \uE718 "
|
|
}
|
|
},
|
|
{
|
|
"type": "root",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\uE0B0",
|
|
"foreground": "#193549",
|
|
"background": "#ffff66"
|
|
},
|
|
{
|
|
"type": "kubectl",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\uE0B0",
|
|
"foreground": "#ffffff",
|
|
"background": "#0077c2",
|
|
"properties": {
|
|
"prefix": " \uFD31 ",
|
|
"template": "{{.Context}} :: {{if .Namespace}}{{.Namespace}}{{else}}default{{end}}"
|
|
}
|
|
},
|
|
{
|
|
"type": "exit",
|
|
"style": "diamond",
|
|
"foreground": "#ffffff",
|
|
"background": "#007800",
|
|
"background_templates": ["{{ if gt .Code 0 }}#f1184c{{ end }}"],
|
|
"leading_diamond": "<transparent,background>\uE0B0</>",
|
|
"trailing_diamond": "\uE0b0",
|
|
"properties": {
|
|
"template": "\ufc8d",
|
|
"always_enabled": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"type": "text",
|
|
"style": "plain",
|
|
"foreground": "#007ACC",
|
|
"properties": {
|
|
"prefix": "",
|
|
"text": "\u279C"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"final_space": true
|
|
}
|