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
188 lines
5.8 KiB
JSON
188 lines
5.8 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"alignment": "left",
|
|
"segments": [
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#26C6DA",
|
|
"leading_diamond": "\ue0c7\u2593",
|
|
"properties": {
|
|
"alpine": "\uf300",
|
|
"arch": "\uf303",
|
|
"centos": "\uf304",
|
|
"debian": "\uf306",
|
|
"elementary": "\uf309",
|
|
"fedora": "\uf30a",
|
|
"gentoo": "\uf30d",
|
|
"linux": "\ue712",
|
|
"macos": "\ue711",
|
|
"manjaro": "\uf312",
|
|
"mint": "\uf30f",
|
|
"opensuse": "\uf314",
|
|
"raspbian": "\uf315",
|
|
"ubuntu": "\uf31c",
|
|
"windows": "\ue70f"
|
|
},
|
|
"style": "diamond",
|
|
"template": " {{ if .WSL }}\ue712 on {{ end }}{{ .Icon }}<#7a7a7a> \ue0b1</>",
|
|
"type": "os"
|
|
},
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#fafafa",
|
|
"style": "diamond",
|
|
"template": " {{ if ne .Env.POSH_SESSION_DEFAULT_USER .UserName }}<#77f5d6>{{ .UserName }}</><#7a7a7a>\uf1fa</>{{ end }}<#2EEFBF>{{ .HostName }}</><#7a7a7a> \ue0b1</>",
|
|
"type": "session"
|
|
},
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#ffff66",
|
|
"style": "diamond",
|
|
"template": " \uf0e7<#7a7a7a> \ue0b1</>",
|
|
"type": "root"
|
|
},
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#fafafa",
|
|
"properties": {
|
|
"folder_icon": "<#B5B2C2>\ue5fe </>",
|
|
"folder_separator_icon": "<#B5B2C2>\ue0bf </>",
|
|
"home_icon": "\uf015",
|
|
"style": "agnoster_short"
|
|
},
|
|
"style": "diamond",
|
|
"template": "<#f2f200> \ue5ff </>{{ .Path }} ",
|
|
"type": "path"
|
|
},
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#ffeb3b",
|
|
"foreground_templates": [
|
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb3b{{ end }}",
|
|
"{{ if gt .Ahead 0 }}#2EC4B6{{ end }}",
|
|
"{{ if gt .Behind 0 }}#8A4FFF{{ end }}"
|
|
],
|
|
"properties": {
|
|
"fetch_stash_count": true,
|
|
"fetch_status": true,
|
|
"fetch_upstream_icon": true
|
|
},
|
|
"style": "diamond",
|
|
"template": "<#7a7a7a>\ue0b1 </>{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#E84855> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#2FDA4E> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
|
|
"type": "git"
|
|
},
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#fafafa",
|
|
"style": "diamond",
|
|
"trailing_diamond": "\ue0b0",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#fafafa",
|
|
"leading_diamond": "\ue0b2",
|
|
"style": "diamond",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#6CA35E",
|
|
"style": "diamond",
|
|
"template": " \ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}<#7a7a7a> \ue0b3</>",
|
|
"type": "node"
|
|
},
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#96E072",
|
|
"style": "diamond",
|
|
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}<#7a7a7a> \ue0b3</>",
|
|
"type": "python"
|
|
},
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#3891A6",
|
|
"style": "diamond",
|
|
"template": " \ue77f {{ if .Unsupported }}\uf071{{ else }}{{ .Full }}{{ end }}<#7a7a7a> \ue0b3</>",
|
|
"type": "dotnet"
|
|
},
|
|
{
|
|
"background": "#2f2f2f",
|
|
"foreground": "#fafafa",
|
|
"properties": {
|
|
"time_format": "15:04:05"
|
|
},
|
|
"style": "diamond",
|
|
"template": " {{ .CurrentDate | date .Format }}<#007ACC> \ue641 </>",
|
|
"trailing_diamond": "\u2593\ue0c6",
|
|
"type": "time"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#7a7a7a",
|
|
"style": "plain",
|
|
"template": "~#@\u276f",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"foreground": "#7a7a7a",
|
|
"style": "plain",
|
|
"template": " \u276e ",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"foreground": "#FFCE5C",
|
|
"properties": {
|
|
"style": "roundrock",
|
|
"threshold": 500
|
|
},
|
|
"style": "plain",
|
|
"template": " {{ .FormattedMs }}<#fafafa> \uf252 </>",
|
|
"type": "executiontime"
|
|
},
|
|
{
|
|
"foreground": "#9FD356",
|
|
"foreground_templates": [
|
|
"{{ if gt .Code 0 }}#E84855{{ end }}"
|
|
],
|
|
"properties": {
|
|
"always_enabled": true
|
|
},
|
|
"style": "plain",
|
|
"template": " \uea9f {{ if gt .Code 0 }}{{ .Code }}{{ end }} ",
|
|
"type": "status"
|
|
}
|
|
],
|
|
"type": "rprompt"
|
|
}
|
|
],
|
|
"console_title_template": "{{if .Root}}root :: {{end}}{{.Shell}} :: {{.Folder}}",
|
|
"final_space": true,
|
|
"transient_prompt": {
|
|
"background": "transparent",
|
|
"foreground": "#7a7a7a",
|
|
"template": " ~#@\u276f "
|
|
},
|
|
"version": 2
|
|
}
|