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
229 lines
6.5 KiB
JSON
229 lines
6.5 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": "#0057b7",
|
|
"style": "plain",
|
|
"template": "\ue0c5",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#0057b7",
|
|
"foreground": "#FBD951",
|
|
"powerline_symbol": "\ue0c4",
|
|
"style": "powerline",
|
|
"template": " \ue795 ",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#0057b7",
|
|
"foreground": "#FBD951",
|
|
"properties": {
|
|
"home_icon": "\ue617",
|
|
"style": "mixed"
|
|
},
|
|
"style": "diamond",
|
|
"template": "{{ .Path }} ",
|
|
"trailing_diamond": "\ue0b0",
|
|
"type": "path"
|
|
},
|
|
{
|
|
"background": "#0057b7",
|
|
"foreground": "#ffd700",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"fetch_stash_count": true,
|
|
"fetch_status": true,
|
|
"fetch_upstream_icon": true
|
|
},
|
|
"style": "powerline",
|
|
"template": " \uf1d3 {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}}\ueb4b {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ",
|
|
"type": "git"
|
|
},
|
|
{
|
|
"background": "#3379c5",
|
|
"background_templates": [
|
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#3379c5{{ end }}",
|
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#c57f33{{ end }}",
|
|
"{{ if gt .Ahead 0 }}#79c533{{ end }}",
|
|
"{{ if gt .Behind 0 }}#c53379{{ end }}"
|
|
],
|
|
"foreground": "#0057b7",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"fetch_stash_count": false,
|
|
"fetch_status": false,
|
|
"fetch_upstream_icon": false
|
|
},
|
|
"style": "powerline",
|
|
"template": "\uf105",
|
|
"type": "git"
|
|
},
|
|
{
|
|
"leading_diamond": "<transparent,#49404f>\ue0b0</>",
|
|
"style": "plain",
|
|
"trailing_diamond": "\ue0b0",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#ffd700",
|
|
"foreground": "#0057b7",
|
|
"foreground_templates": [
|
|
"{{ if gt .Code 0 }}#a30000{{ end }}"
|
|
],
|
|
"leading_diamond": "<transparent,#ffd700>\ue0b0</>",
|
|
"properties": {
|
|
"always_enabled": true
|
|
},
|
|
"style": "diamond",
|
|
"template": " {{ if gt .Code 0 }}\uf421 \uf119 {{ else }}\uf469 \u2665 {{ end }}",
|
|
"trailing_diamond": "\ue0b0",
|
|
"type": "status"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"background": "#0057b7",
|
|
"foreground": "#FBD951",
|
|
"leading_diamond": "\ue0b6",
|
|
"style": "diamond",
|
|
"template": " \uf0ac <#111111>\ue0b2</>",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#0057b7",
|
|
"foreground": "#FBD951",
|
|
"invert_powerline": true,
|
|
"leading_diamond": "\ue0b2",
|
|
"properties": {
|
|
"charged_icon": "\ueb2d ",
|
|
"charging_icon": "\uf492 ",
|
|
"discharging_icon": "\uf243 "
|
|
},
|
|
"style": "diamond",
|
|
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}% <#111111>\ue0b2</>",
|
|
"type": "battery"
|
|
},
|
|
{
|
|
"background": "#0057b7",
|
|
"foreground": "#FBD951",
|
|
"invert_powerline": true,
|
|
"leading_diamond": "\ue0b2",
|
|
"properties": {
|
|
"always_enabled": true
|
|
},
|
|
"style": "diamond",
|
|
"template": " \ueba2 {{ .FormattedMs }} <#111111>\ue0b2</>",
|
|
"type": "executiontime"
|
|
},
|
|
{
|
|
"background": "#0057b7",
|
|
"foreground": "#FBD951",
|
|
"invert_powerline": true,
|
|
"leading_diamond": "\ue0b2",
|
|
"properties": {
|
|
"time_format": "_2,15:04"
|
|
},
|
|
"style": "diamond",
|
|
"template": " \uf073 {{ .CurrentDate | date .Format }}",
|
|
"trailing_diamond": "\ue0b4",
|
|
"type": "time"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#0057b7",
|
|
"style": "plain",
|
|
"template": "\ue0c5",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#0057b7",
|
|
"foreground": "#ffd700",
|
|
"powerline_symbol": "\ue0c4",
|
|
"style": "powerline",
|
|
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ",
|
|
"type": "os"
|
|
},
|
|
{
|
|
"background": "#0057b7",
|
|
"foreground": "#FBD951",
|
|
"powerline_symbol": "\ue0b0",
|
|
"style": "powerline",
|
|
"template": "\uf0e7 ",
|
|
"type": "root"
|
|
},
|
|
{
|
|
"background": "#FBD951",
|
|
"foreground": "#0057b7",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"display_host": false
|
|
},
|
|
"style": "powerline",
|
|
"template": " {{ if .SSHSession }}\ueba9 {{ end }}{{ .UserName }} ",
|
|
"type": "session"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"foreground": "#0057b7",
|
|
"style": "plain",
|
|
"template": "\uf004",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"foreground": "#FBD951",
|
|
"style": "plain",
|
|
"template": "\uf004",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"foreground": "#0057b7",
|
|
"style": "plain",
|
|
"template": "\uf004",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"foreground": "#FBD951",
|
|
"style": "plain",
|
|
"template": "\uf004 Ukraine",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"type": "rprompt"
|
|
}
|
|
],
|
|
"console_title_template": "{{if .Root}}Admin: {{end}} {{.Folder}}",
|
|
"final_space": true,
|
|
"version": 2
|
|
}
|