mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-13 14:34:06 -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
167 lines
4.6 KiB
JSON
167 lines
4.6 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#ffffff",
|
|
"style": "plain",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"segments": [
|
|
{
|
|
"foreground": "#185F7B",
|
|
"style": "plain",
|
|
"template": "\ue0c5",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#185F7B",
|
|
"foreground": "#185F7B",
|
|
"powerline_symbol": "\ue0c4",
|
|
"style": "powerline",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#185F7B",
|
|
"foreground": "#ffffff",
|
|
"properties": {
|
|
"home_icon": "\ue617 ",
|
|
"style": "mixed"
|
|
},
|
|
"style": "diamond",
|
|
"template": "{{ .Path }} ",
|
|
"trailing_diamond": "\ue0b0",
|
|
"type": "path"
|
|
},
|
|
{
|
|
"background": "#6f42c1",
|
|
"foreground": "#ffffff",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"fetch_stash_count": true,
|
|
"fetch_status": true,
|
|
"fetch_upstream_icon": true
|
|
},
|
|
"style": "powerline",
|
|
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
|
|
"type": "git"
|
|
},
|
|
{
|
|
"leading_diamond": "<transparent,#49404f>\ue0b0</>",
|
|
"style": "plain",
|
|
"trailing_diamond": "\ue0b0",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#4caf50",
|
|
"background_templates": [
|
|
"{{ if gt .Code 0 }}red{{ end }}"
|
|
],
|
|
"foreground": "#ffffff",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"always_enabled": true
|
|
},
|
|
"style": "powerline",
|
|
"template": " {{ if gt .Code 0 }}\uf421{{ else }}\uf469 \u2665{{ end }} ",
|
|
"type": "status"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"background": "#2B2B2B",
|
|
"foreground": "#ffffff",
|
|
"invert_powerline": true,
|
|
"leading_diamond": "\ue0c5",
|
|
"properties": {
|
|
"time_format": "3:04:05 PM"
|
|
},
|
|
"style": "diamond",
|
|
"template": " {{ .CurrentDate | date .Format }}<#ffffff> \ue641 </>",
|
|
"trailing_diamond": "\ue0c4",
|
|
"type": "time"
|
|
},
|
|
{
|
|
"background": "#2B2B2B",
|
|
"foreground": "#ffffff",
|
|
"invert_powerline": true,
|
|
"leading_diamond": "\ue0c5",
|
|
"properties": {
|
|
"always_enabled": true
|
|
},
|
|
"style": "diamond",
|
|
"template": " {{ .FormattedMs }}<#ffffff> \uf252 </>",
|
|
"trailing_diamond": "\ue0c4",
|
|
"type": "executiontime"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#2B2B2B",
|
|
"style": "plain",
|
|
"template": "\ue0c5",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#2B2B2B",
|
|
"foreground": "#1CA6A3",
|
|
"powerline_symbol": "\ue0c4",
|
|
"style": "powerline",
|
|
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ",
|
|
"type": "os"
|
|
},
|
|
{
|
|
"background": "#2B2B2B",
|
|
"foreground": "#FBD951",
|
|
"powerline_symbol": "\ue0b0",
|
|
"style": "powerline",
|
|
"template": "\uf0e7 ",
|
|
"type": "root"
|
|
},
|
|
{
|
|
"background": "#DC291E",
|
|
"foreground": "#ffffff",
|
|
"powerline_symbol": "\ue0b0",
|
|
"style": "powerline",
|
|
"template": " {{ .UserName }} ",
|
|
"type": "session"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"background": "#000000",
|
|
"foreground": "#666666",
|
|
"style": "plain",
|
|
"template": "\uf489 {{ .Name }}",
|
|
"type": "shell"
|
|
}
|
|
],
|
|
"type": "rprompt"
|
|
}
|
|
],
|
|
"console_title_template": "{{if .Root}}Admin: {{end}} {{.Folder}}",
|
|
"final_space": true,
|
|
"version": 2
|
|
}
|