mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 03:49:40 -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
87 lines
2.1 KiB
JSON
87 lines
2.1 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "right",
|
|
"overflow": "hide",
|
|
"segments": [
|
|
{
|
|
"type": "executiontime",
|
|
"style": "powerline",
|
|
"foreground": "#a9ffb4",
|
|
"template": " {{ .FormattedMs }}s <#ffffff>\ue601</>",
|
|
"properties": {
|
|
"threshold": 0,
|
|
"style": "dallas"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"style": "powerline",
|
|
"foreground": "#45bf17",
|
|
"template": " \ue718 {{ .Full }} "
|
|
},
|
|
{
|
|
"type": "npm",
|
|
"style": "powerline",
|
|
"foreground": "#FE4A49",
|
|
"template": "<#F3EFF5>and</> \ue71e {{ .Full }} "
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "prompt",
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"overflow": "break",
|
|
"segments": [
|
|
{
|
|
"type": "path",
|
|
"style": "powerline",
|
|
"foreground": "#ffafd2",
|
|
"properties": {
|
|
"style": "agnoster_full",
|
|
"home_icon": "home",
|
|
"folder_icon": "\uf07b",
|
|
"folder_separator_icon": " \u276f "
|
|
},
|
|
"template": "\ue5ff {{ .Path }} "
|
|
},
|
|
{
|
|
"type": "git",
|
|
"style": "powerline",
|
|
"foreground": "#f14e32",
|
|
"properties": {
|
|
"branch_icon": "\ue725 "
|
|
},
|
|
"template": "({{ .HEAD }})"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"type": "prompt",
|
|
"segments": [
|
|
{
|
|
"type": "status",
|
|
"style": "diamond",
|
|
"foreground": "#00c7fc",
|
|
"properties": {
|
|
"always_enabled": true
|
|
},
|
|
"template": "<#00c7fc>\u276f</>_: "
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"console_title_template": "{{ .Folder }}",
|
|
"transient_prompt": {
|
|
"background": "transparent",
|
|
"foreground": "#FEF5ED",
|
|
"template": "{{ .Shell }}"
|
|
},
|
|
"version": 2
|
|
}
|