mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
f47da9592f
BREAKING CHANGE: exit segment is now called status segment. The exit keyword is now deprecated and will be removed in a future release. Please use the status keyword instead: ```diff "segments": { { - "type": "exit" + "type": "status" } } ``` Additionally, the status segment configuration has changed to support $PIPESTATUS. You can include a status template to customize the rendering of each individual status code (supported in fish, zsh and bash). ```json "segments": { { "type": "status", "properties": { "status_template": "{{ if gt .Code 0 }}\uf071{{ else }}\uf00c{{ end }}", "status_separator": " " } } } ``` In case no $PIPESTATUS is available, the status segment will fall back to the exit code of the last command using the status template for rendering. The `{{ .Meaning }}` property has been marked as deprecated and can be replaced with `{{ reason .Code }}`, allowing it to be reused in cross segment templates. resolves #4070
112 lines
3.6 KiB
JSON
112 lines
3.6 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"console_title_template": "{{if .Segments.Git.RepoName}} {{.Segments.Git.RepoName}} {{else}} {{.Folder}} {{end}}",
|
|
"blocks": [
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"type": "session",
|
|
"foreground": "#757575",
|
|
"properties": {
|
|
"display_host": true
|
|
},
|
|
"style": "plain",
|
|
"template": "\u250c {{ if .SSHSession }}\ueba9 {{ end }}{{ .UserName }}@{{ .HostName }} "
|
|
},
|
|
{
|
|
"type": "path",
|
|
"background": "#91ddff",
|
|
"foreground": "#100e23",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"style": "agnoster_full"
|
|
},
|
|
"style": "powerline",
|
|
"template": " {{ .Path }} "
|
|
},
|
|
{
|
|
"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 }}"
|
|
],
|
|
"template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ 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 }} ",
|
|
"properties": {
|
|
"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 ",
|
|
"fetch_stash_count": true,
|
|
"fetch_status": true,
|
|
"merge_icon": "\u25f4 ",
|
|
"no_commits_icon": "[no commits]",
|
|
"rebase_icon": "\u2c62 ",
|
|
"tag_icon": "\u25b6 ",
|
|
"untracked_modes": {
|
|
"/Users/user/Projects/oh-my-posh/": "no"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "terraform",
|
|
"background": "#ffee58",
|
|
"foreground": "#100e23",
|
|
"powerline_symbol": "\ue0b0",
|
|
"style": "powerline",
|
|
"template": " {{ .WorkspaceName }}{{ if .Version }} {{ .Version }}{{ end }} "
|
|
},
|
|
{
|
|
"type": "status",
|
|
"background": "#ff8080",
|
|
"foreground": "#ffffff",
|
|
"powerline_symbol": "\ue0b0",
|
|
"style": "powerline",
|
|
"template": " {{ if gt .Code 0 }}error{{ else }}\uf42e{{ end }} "
|
|
},
|
|
{
|
|
"type": "time",
|
|
"foreground": "#689f38",
|
|
"properties": {
|
|
"time_format": "15:04:05"
|
|
},
|
|
"style": "plain",
|
|
"template": " <#757575,>|</> {{ .CurrentDate | date .Format }}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"type": "text",
|
|
"foreground": "#757575",
|
|
"style": "plain",
|
|
"template": "\u2514"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"foreground": "#ffffff",
|
|
"style": "plain",
|
|
"template": "$"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"final_space": true,
|
|
"version": 2
|
|
}
|