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
92 lines
2.8 KiB
JSON
92 lines
2.8 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"alignment": "left",
|
|
"segments": [
|
|
{
|
|
"foreground": "lightBlue",
|
|
"foreground_templates": [
|
|
"{{ if .Root }}lightRed{{ end }}"
|
|
],
|
|
"properties": {
|
|
"display_host": true
|
|
},
|
|
"style": "plain",
|
|
"template": "<{{ if .Root }}lightBlue{{ else }}green{{ end }}>\u250c\u2500\u2500(</>{{ .UserName }}{{ if .Root }}💀{{ else }}㉿{{ end }}{{ .HostName }}<{{ if .Root }}lightBlue{{ else }}green{{ end }}>)</>",
|
|
"type": "session"
|
|
},
|
|
{
|
|
"foreground": "yellow",
|
|
"properties": {
|
|
"fetch_version": false,
|
|
"fetch_virtual_env": true
|
|
},
|
|
"style": "plain",
|
|
"template": "<{{ if .Root }}lightBlue{{ else }}green{{ end }}>-[</>\ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }}{{ end }}{{ .Full }}{{ end }}<{{ if .Root }}lightBlue{{ else }}green{{ end }}>]</>",
|
|
"type": "python"
|
|
},
|
|
{
|
|
"foreground": "lightWhite",
|
|
"properties": {
|
|
"folder_separator_icon": "<#c0c0c0>/</>",
|
|
"style": "full"
|
|
},
|
|
"style": "plain",
|
|
"template": "<{{ if .Root }}lightBlue{{ else }}green{{ end }}>-[</>{{ .Path }}<{{ if .Root }}lightBlue{{ else }}green{{ end }}>]</>",
|
|
"type": "path"
|
|
},
|
|
{
|
|
"foreground": "white",
|
|
"style": "plain",
|
|
"template": "<{{ if .Root }}lightBlue{{ else }}green{{ end }}>-[</>{{ .HEAD }}<{{ if .Root }}lightBlue{{ else }}green{{ end }}>]</>",
|
|
"type": "git"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"foreground": "white",
|
|
"properties": {
|
|
"always_enabled": true,
|
|
"style": "round"
|
|
},
|
|
"style": "plain",
|
|
"template": " {{ .FormattedMs }} ",
|
|
"type": "executiontime"
|
|
},
|
|
{
|
|
"foreground": "green",
|
|
"foreground_templates": [
|
|
"{{ if gt .Code 0 }}red{{ end }}"
|
|
],
|
|
"properties": {
|
|
"always_enabled": true
|
|
},
|
|
"style": "plain",
|
|
"template": " {{ if gt .Code 0 }}\u2a2f{{else}}\u2713{{ end }} ",
|
|
"type": "status"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "lightBlue",
|
|
"style": "plain",
|
|
"template": "<{{ if .Root }}lightBlue{{ else }}green{{ end }}>\u2514\u2500</>{{ if .Root }}<lightRed>#</>{{ else }}${{ end }} ",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
}
|
|
],
|
|
"version": 2
|
|
}
|