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
101 lines
2.8 KiB
JSON
101 lines
2.8 KiB
JSON
{
|
||
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
||
"blocks": [
|
||
{
|
||
"alignment": "left",
|
||
"newline": true,
|
||
"segments": [
|
||
{
|
||
"foreground": "#b1ff4f",
|
||
"style": "powerline",
|
||
"template": "[🐍 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}] ",
|
||
"type": "python"
|
||
},
|
||
{
|
||
"foreground": "#ffaed8",
|
||
"properties": {
|
||
"folder_separator_icon": " 🢖 ",
|
||
"home_icon": "\u2764",
|
||
"style": "letter"
|
||
},
|
||
"style": "plain",
|
||
"template": "<#eaeaea>\u23a7</> \u27e8{{ .Path }}\u27e9 ",
|
||
"type": "path"
|
||
},
|
||
{
|
||
"foreground": "#62beff",
|
||
"properties": {
|
||
"branch_icon": "\u27df",
|
||
"branch_identical_icon": "\u2261",
|
||
"fetch_status": true
|
||
},
|
||
"style": "plain",
|
||
"template": "\u27e8{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \u2206{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}\u27e9",
|
||
"type": "git"
|
||
},
|
||
{
|
||
"foreground": "#98C379",
|
||
"properties": {
|
||
"fetch_version": true
|
||
},
|
||
"style": "plain",
|
||
"template": "<#ffffff>\u25e6</> \u2622{{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
|
||
"type": "node"
|
||
}
|
||
],
|
||
"type": "prompt"
|
||
},
|
||
{
|
||
"alignment": "right",
|
||
"segments": [
|
||
{
|
||
"foreground": "#fb0207",
|
||
"style": "plain",
|
||
"template": " ××× ",
|
||
"type": "status"
|
||
},
|
||
{
|
||
"foreground": "#9966ff",
|
||
"properties": {
|
||
"style": "austin",
|
||
"threshold": 0
|
||
},
|
||
"style": "plain",
|
||
"template": "\u27e8{{ .FormattedMs }}\u27e9 <#eaeaea>\u23ab</>",
|
||
"type": "executiontime"
|
||
}
|
||
],
|
||
"type": "prompt"
|
||
},
|
||
{
|
||
"alignment": "left",
|
||
"newline": true,
|
||
"segments": [
|
||
{
|
||
"foreground": "#3ce6bf",
|
||
"style": "plain",
|
||
"template": "<#eaeaea>\u23a9</>\u27e9\u27e9\u27e9\u27e9\u27e9\u27e9 ",
|
||
"type": "text"
|
||
}
|
||
],
|
||
"type": "prompt"
|
||
},
|
||
{
|
||
"alignment": "right",
|
||
"segments": [
|
||
{
|
||
"foreground": "#f5f5a6",
|
||
"properties": {
|
||
"time_format": "15:04:05"
|
||
},
|
||
"style": "plain",
|
||
"template": "\u27e8{{ .CurrentDate | date .Format }}\u27e9 <#eaeaea>\u23ad</>",
|
||
"type": "time"
|
||
}
|
||
],
|
||
"type": "rprompt"
|
||
}
|
||
],
|
||
"version": 2
|
||
}
|