mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-26 19:39:39 -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
131 lines
3.3 KiB
JSON
131 lines
3.3 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"palette": {
|
|
"white": "#f7f7f7",
|
|
"black": "#111111"
|
|
},
|
|
"blocks": [
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"background": "transparent",
|
|
"foreground": "p:white",
|
|
"style": "plain",
|
|
"template": "\u250c",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#464646",
|
|
"foreground": "p:white",
|
|
"properties": {
|
|
"windows": "\ue62a",
|
|
"linux": "\uf17c",
|
|
"ubuntu": "\uf31b",
|
|
"macos": "\uf179"
|
|
},
|
|
"style": "plain",
|
|
"template": " {{.Icon}}{{if .WSL}} (WSL){{end}}\u2800",
|
|
"type": "os"
|
|
},
|
|
{
|
|
"background": "p:white",
|
|
"foreground": "p:black",
|
|
"style": "plain",
|
|
"template": " \uf489 {{.Name}}\u2800",
|
|
"type": "shell"
|
|
},
|
|
{
|
|
"background": "#ffe093",
|
|
"foreground": "p:black",
|
|
"style": "plain",
|
|
"template": " \uf2c0 {{.HostName}}\ue0bd{{.UserName}}\u2800",
|
|
"type": "session"
|
|
},
|
|
{
|
|
"background": "#ffffd6",
|
|
"foreground": "p:black",
|
|
"properties": {
|
|
"branch_icon": " \ue0a0 "
|
|
},
|
|
"style": "plain",
|
|
"template": "{{.HEAD}}\u2800",
|
|
"type": "git"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"background": "transparent",
|
|
"foreground": "#b3ffde",
|
|
"properties": {
|
|
"style": "austin",
|
|
"threshold": 0
|
|
},
|
|
"style": "plain",
|
|
"template": "{{.FormattedMs}}",
|
|
"type": "executiontime"
|
|
},
|
|
{
|
|
"background": "transparent",
|
|
"foreground": "#b3ffde",
|
|
"properties": {
|
|
"time_format": "02/01/06 15:04"
|
|
},
|
|
"style": "plain",
|
|
"template": "<p:white> · </>{{.CurrentDate | date .Format}}",
|
|
"type": "time"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"background": "transparent",
|
|
"foreground": "p:white",
|
|
"properties": {
|
|
"folder_icon": "\uf07b",
|
|
"folder_separator_template": "<#93d0ff> \u00bb </>",
|
|
"home_icon": "\ueb06",
|
|
"style": "agnoster"
|
|
},
|
|
"style": "plain",
|
|
"template": "<p:white>\u2514</><#93d0ff>[</> {{.Path}} <#93d0ff>]</>",
|
|
"type": "path"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"background": "transparent",
|
|
"foreground": "#81ff91",
|
|
"foreground_templates": [
|
|
"{{if gt .Code 0}}#ff3030{{end}}"
|
|
],
|
|
"properties": {
|
|
"always_enabled": true
|
|
},
|
|
"style": "plain",
|
|
"template": "\u276f",
|
|
"type": "status"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"console_title_template": "{{if .Root}}[root] {{end}}{{.Shell}} in <{{.Folder}}>",
|
|
"final_space": true,
|
|
"version": 2
|
|
}
|