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
147 lines
3.9 KiB
JSON
147 lines
3.9 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"console_title_template": " {{ .Folder }} :: {{if .Root}}Admin{{end}}",
|
|
"palette": {
|
|
"main-bg": "#24283b",
|
|
"terminal-red": "#f7768e",
|
|
"pistachio-green": "#9ece6a",
|
|
"terminal-green": "#73daca",
|
|
"terminal-yellow": "#e0af68",
|
|
"terminal-blue": "#7aa2f7",
|
|
"celeste-blue": "#b4f9f8",
|
|
"light-sky-blue": "#7dcfff",
|
|
"terminal-white": "#c0caf5",
|
|
"white-blue": "#a9b1d6",
|
|
"blue-bell": "#9aa5ce",
|
|
"pastal-grey": "#cfc9c2",
|
|
"terminal-magenta": "#bb9af7",
|
|
"blue-black": "#565f89",
|
|
"terminal-black": "#414868",
|
|
"t-background": "p:main-bg"
|
|
},
|
|
"blocks": [
|
|
{
|
|
"alignment": "left",
|
|
"segments": [
|
|
{
|
|
"type": "text",
|
|
"style": "plain",
|
|
"background": "transparent",
|
|
"foreground": "p:terminal-blue",
|
|
"template": "\u279c "
|
|
},
|
|
{
|
|
"type": "path",
|
|
"style": "plain",
|
|
"foreground": "p:terminal-magenta",
|
|
"properties": {
|
|
"style": "folder"
|
|
},
|
|
"template": "<b>{{ .Path }}</b> <p:light-sky-blue>\u26a1</>"
|
|
},
|
|
{
|
|
"type": "git",
|
|
"style": "plain",
|
|
"foreground": "p:light-sky-blue",
|
|
"foreground_templates": [
|
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:terminal-red{{ end }}",
|
|
"{{ if and (gt .Ahead 0) (gt .Behind 0)}}p:light-sky-blue {{ end }}",
|
|
"{{ if gt .Ahead 0 }}p:terminal-blue{{ end }}",
|
|
"{{ if gt .Behind 0 }}p:celeste-blue{{ end }}"
|
|
],
|
|
"template": "({{ .HEAD}})",
|
|
"properties": {
|
|
"fetch_status": true,
|
|
"branch_icon": "\ue725 "
|
|
}
|
|
},
|
|
{
|
|
"type": "status",
|
|
"style": "plain",
|
|
"foreground": "p:terminal-red",
|
|
"template": " \uf00d"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"overflow": "hide",
|
|
"segments": [
|
|
{
|
|
"type": "node",
|
|
"style": "plain",
|
|
"foreground": "p:pistachio-green",
|
|
"template": "\ue718 {{ .Full }} "
|
|
},
|
|
{
|
|
"type": "php",
|
|
"style": "plain",
|
|
"foreground": "p:terminal-blue",
|
|
"template": "\ue73d {{ .Full }} "
|
|
},
|
|
{
|
|
"type": "python",
|
|
"style": "plain",
|
|
"foreground": "p:terminal-yellow",
|
|
"template": "\uE235 {{ .Full }}"
|
|
},
|
|
{
|
|
"type": "julia",
|
|
"style": "plain",
|
|
"foreground": "p:terminal-magenta",
|
|
"template": "\uE624 {{ .Full }}"
|
|
},
|
|
{
|
|
"type": "ruby",
|
|
"style": "plain",
|
|
"foreground": "p:terminal-red",
|
|
"template": "\uE791 {{ .Full}}"
|
|
},
|
|
{
|
|
"type": "go",
|
|
"style": "plain",
|
|
"foreground": "p:light-sky-blue",
|
|
"template": "\uFCD1 {{ .Full}}"
|
|
},
|
|
{
|
|
"type": "command",
|
|
"style": "plain",
|
|
"foreground": "p:white-blue",
|
|
"properties": {
|
|
"command": "git log --pretty=format:%cr -1 || date +%H:%M:%S",
|
|
"shell": "bash"
|
|
}
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "p:pistachio-green",
|
|
"style": "plain",
|
|
"template": "\u25b6",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
}
|
|
],
|
|
"secondary_prompt": {
|
|
"background": "transparent",
|
|
"foreground": "p:terminal-blue",
|
|
"template": "\u279c "
|
|
},
|
|
"transient_prompt": {
|
|
"background": "p:t-background",
|
|
"foreground": "p:terminal-blue",
|
|
"template": "\u279c "
|
|
},
|
|
"final_space": true,
|
|
"version": 2,
|
|
"terminal_background": "p:t-background"
|
|
}
|