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
143 lines
3.9 KiB
JSON
143 lines
3.9 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"osc99": true,
|
|
"blocks": [
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"type": "shell",
|
|
"style": "plain",
|
|
"foreground": "#007acc",
|
|
"properties": {
|
|
"prefix": "",
|
|
"postfix": ""
|
|
}
|
|
},
|
|
{
|
|
"type": "root",
|
|
"style": "plain",
|
|
"foreground": "#ff8080",
|
|
"properties": {
|
|
"prefix": " <#757575,>as</> ",
|
|
"postfix": "",
|
|
"root_icon": "root"
|
|
}
|
|
},
|
|
{
|
|
"type": "time",
|
|
"style": "plain",
|
|
"foreground": "#689f38",
|
|
"properties": {
|
|
"prefix": " <#757575,>|</> ",
|
|
"postfix": "",
|
|
"time_format": "15:04:05"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"type": "session",
|
|
"style": "plain",
|
|
"foreground": "#757575",
|
|
"properties": {
|
|
"prefix": "\u250c ",
|
|
"template": "{{ .UserName }}@{{ .HostName }}"
|
|
}
|
|
},
|
|
{
|
|
"type": "path",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\ue0b0",
|
|
"foreground": "#100e23",
|
|
"background": "#91ddff",
|
|
"properties": {
|
|
"style": "folder",
|
|
"enable_hyperlink": false
|
|
}
|
|
},
|
|
{
|
|
"type": "git",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\ue0b0",
|
|
"foreground": "#100e23",
|
|
"background": "#95ffa4",
|
|
"background_templates": [
|
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
|
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
|
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
|
"{{ if gt .Behind 0 }}#c5b6ad{{ end }}"
|
|
],
|
|
"properties": {
|
|
"fetch_status": true,
|
|
"fetch_stash_count": true,
|
|
"branch_ahead_icon": "\u2191",
|
|
"branch_behind_icon": "\u2193",
|
|
"branch_gone": "\u2262",
|
|
"branch_icon": "\ue0a0 ",
|
|
"branch_identical_icon": "\u2261",
|
|
"cherry_pick_icon": "\u2713 ",
|
|
"commit_icon": "\u25b7 ",
|
|
"merge_icon": "\u25f4 ",
|
|
"no_commits_icon": "[no commits]",
|
|
"rebase_icon": "\u2c62 ",
|
|
"tag_icon": "\u25b6 ",
|
|
"template": "{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} \u2502{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }}"
|
|
}
|
|
},
|
|
{
|
|
"type": "terraform",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\ue0b0",
|
|
"foreground": "#100e23",
|
|
"background": "#ffee58"
|
|
},
|
|
{
|
|
"type": "exit",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\ue0b0",
|
|
"foreground": "#ffffff",
|
|
"background": "#ff8080",
|
|
"properties": {
|
|
"template": "error"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"type": "text",
|
|
"style": "plain",
|
|
"foreground": "#757575",
|
|
"properties": {
|
|
"prefix": "",
|
|
"postfix": "",
|
|
"text": "\u2514 "
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"style": "plain",
|
|
"foreground": "#ffffff",
|
|
"properties": {
|
|
"prefix": "",
|
|
"postfix": "",
|
|
"text": "$"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"final_space": true
|
|
}
|