mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54: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
171 lines
5.2 KiB
JSON
171 lines
5.2 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"alignment": "left",
|
|
"segments": [
|
|
{
|
|
"background": "#0E050F",
|
|
"foreground": "#EFDCF9",
|
|
"properties": {
|
|
"arch": "\uf303",
|
|
"debian": "\uf306",
|
|
"fedora": "\uf30a",
|
|
"linux": "\uf17c",
|
|
"macos": "\uf179",
|
|
"manjaro": "\uf312",
|
|
"opensuse": "\uf314",
|
|
"ubuntu": "\uf31b",
|
|
"windows": "\uf17a"
|
|
},
|
|
"style": "diamond",
|
|
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ",
|
|
"type": "os"
|
|
},
|
|
{
|
|
"background": "#170B3B",
|
|
"foreground": "#EFDCF9",
|
|
"powerline_symbol": "\ue0b4",
|
|
"properties": {
|
|
"folder_icon": "...",
|
|
"folder_separator_icon": "/",
|
|
"home_icon": "~",
|
|
"max_depth": 3,
|
|
"style": "agnoster_short"
|
|
},
|
|
"style": "powerline",
|
|
"template": " {{ .Path }} ",
|
|
"type": "path"
|
|
},
|
|
{
|
|
"background": "#341948",
|
|
"foreground": "#EFDCF9",
|
|
"powerline_symbol": "\ue0b4",
|
|
"properties": {
|
|
"branch_max_length": 25,
|
|
"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"
|
|
},
|
|
{
|
|
"background": "#4c1f5e",
|
|
"foreground": "#EFDCF9",
|
|
"powerline_symbol": "\ue0b4",
|
|
"properties": {
|
|
"always_enabled": true
|
|
},
|
|
"style": "powerline",
|
|
"template": " {{ .FormattedMs }} ",
|
|
"type": "executiontime"
|
|
},
|
|
{
|
|
"background": "#69307A",
|
|
"foreground": "#EFDCF9",
|
|
"foreground_templates": [
|
|
"{{ if gt .Code 0 }}#FF3C3C{{ end }}"
|
|
],
|
|
"properties": {
|
|
"always_enabled": true
|
|
},
|
|
"style": "diamond",
|
|
"template": " \ueb05{{ if gt .Code 0 }} {{.Code}}{{ end }} ",
|
|
"trailing_diamond": "\ue0b4",
|
|
"type": "status"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"background": "#4c1f5e",
|
|
"foreground": "#E4F34A",
|
|
"leading_diamond": " \ue0b6",
|
|
"properties": {
|
|
"fetch_version": false
|
|
},
|
|
"style": "diamond",
|
|
"template": "\ue235{{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}",
|
|
"trailing_diamond": "\ue0b4",
|
|
"type": "python"
|
|
},
|
|
{
|
|
"background": "#4c1f5e",
|
|
"foreground": "#7FD5EA",
|
|
"leading_diamond": " \ue0b6",
|
|
"properties": {
|
|
"fetch_version": false
|
|
},
|
|
"style": "diamond",
|
|
"template": "\ue626{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
|
|
"trailing_diamond": "\ue0b4",
|
|
"type": "go"
|
|
},
|
|
{
|
|
"background": "#4c1f5e",
|
|
"foreground": "#42E66C",
|
|
"leading_diamond": " \ue0b6",
|
|
"properties": {
|
|
"fetch_version": false
|
|
},
|
|
"style": "diamond",
|
|
"template": "\ue718{{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}",
|
|
"trailing_diamond": "\ue0b4",
|
|
"type": "node"
|
|
},
|
|
{
|
|
"background": "#4c1f5e",
|
|
"foreground": "#E64747",
|
|
"leading_diamond": " \ue0b6",
|
|
"properties": {
|
|
"fetch_version": false
|
|
},
|
|
"style": "diamond",
|
|
"template": "\ue791{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
|
|
"trailing_diamond": "\ue0b4",
|
|
"type": "ruby"
|
|
},
|
|
{
|
|
"background": "#4c1f5e",
|
|
"foreground": "#E64747",
|
|
"leading_diamond": " \ue0b6",
|
|
"properties": {
|
|
"fetch_version": false
|
|
},
|
|
"style": "diamond",
|
|
"template": "\ue738{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
|
|
"trailing_diamond": "\ue0b4",
|
|
"type": "java"
|
|
}
|
|
],
|
|
"type": "rprompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"background": "#4c1f5e",
|
|
"foreground": "#EFDCF9",
|
|
"properties": {
|
|
"time_format": "15:04:05"
|
|
},
|
|
"style": "diamond",
|
|
"template": " {{ .CurrentDate | date .Format }} ",
|
|
"trailing_diamond": "\ue0b4",
|
|
"type": "time"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
}
|
|
],
|
|
"console_title_template": "{{ .Shell }} - {{ .Folder }}",
|
|
"final_space": true,
|
|
"version": 2
|
|
}
|