mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-29 04:49:39 -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
107 lines
2.4 KiB
JSON
107 lines
2.4 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"segments": [
|
|
{
|
|
"type": "python",
|
|
"style": "plain",
|
|
"foreground": "white",
|
|
"properties": {
|
|
"prefix": "(",
|
|
"postfix": ")",
|
|
"display_version": false
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"type": "text",
|
|
"style": "plain",
|
|
"foreground": "lightBlue",
|
|
"properties": {
|
|
"prefix": "",
|
|
"text": "#"
|
|
}
|
|
},
|
|
{
|
|
"type": "root",
|
|
"style": "plain",
|
|
"foreground": "red",
|
|
"properties": {
|
|
"root_icon": "%"
|
|
}
|
|
},
|
|
{
|
|
"type": "session",
|
|
"style": "plain",
|
|
"properties": {
|
|
"prefix": "",
|
|
"template": "<cyan>{{ .UserName }}</> <darkGray>@</> <green>{{ .HostName }}</>"
|
|
}
|
|
},
|
|
{
|
|
"type": "path",
|
|
"style": "plain",
|
|
"foreground": "lightYellow",
|
|
"properties": {
|
|
"prefix": "<darkGray>in </>",
|
|
"style": "full"
|
|
}
|
|
},
|
|
{
|
|
"type": "git",
|
|
"style": "plain",
|
|
"properties": {
|
|
"prefix": "<darkGray>on</> <white>git:</>",
|
|
"template": "{{ .HEAD }}"
|
|
}
|
|
},
|
|
{
|
|
"type": "time",
|
|
"style": "plain",
|
|
"foreground": "darkGray",
|
|
"properties": {
|
|
"prefix": "[",
|
|
"postfix": "]"
|
|
}
|
|
},
|
|
{
|
|
"type": "exit",
|
|
"style": "plain",
|
|
"foreground": "red",
|
|
"properties": {
|
|
"template": "C:{{ if gt .Code 0 }}{{ .Code }}{{ end }}",
|
|
"always_numeric": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"type": "text",
|
|
"style": "plain",
|
|
"foreground": "lightRed",
|
|
"properties": {
|
|
"prefix": "",
|
|
"text": "$",
|
|
"postfix": ""
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"final_space": true
|
|
}
|