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
176 lines
5.2 KiB
JSON
176 lines
5.2 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#1865f5",
|
|
"properties": {
|
|
"alpine": "\uf300",
|
|
"arch": "\uf303",
|
|
"centos": "\uf304",
|
|
"debian": "\uf306",
|
|
"elementary": "\uf309",
|
|
"fedora": "\uf30a",
|
|
"gentoo": "\uf30d",
|
|
"linux": "\ue712",
|
|
"macos": "\uf179 ",
|
|
"manjaro": "\uf312",
|
|
"mint": "\uf30f",
|
|
"opensuse": "\uf314",
|
|
"raspbian": "\uf315",
|
|
"ubuntu": "\uf31b ",
|
|
"windows": "\ue62a ",
|
|
"wsl": "\ue712"
|
|
},
|
|
"style": "diamond",
|
|
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}}",
|
|
"trailing_diamond": "<transparent,>\ue0b2</>",
|
|
"type": "os"
|
|
},
|
|
{
|
|
"background": "#00c7fc",
|
|
"foreground": "#000000",
|
|
"style": "diamond",
|
|
"leading_diamond": "<transparent,#00c7fc>\ue0b0</>",
|
|
"properties": {
|
|
"template": " \ue266 CPU: {{ round .PhysicalPercentUsed .Precision }}% | "
|
|
},
|
|
"type": "sysinfo"
|
|
},
|
|
{
|
|
"background": "#00c7fc",
|
|
"foreground": "#000000",
|
|
"style": "diamond",
|
|
"template": "RAM: {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1000000000.0) }}GB \ue266 ",
|
|
"trailing_diamond": "<transparent,#00c7fc>\ue0b2</>",
|
|
"type": "sysinfo"
|
|
},
|
|
{
|
|
"background": "#2343e2",
|
|
"foreground": "#ffffff",
|
|
"leading_diamond": "\ue0b2",
|
|
"properties": {
|
|
"style": "roundrock",
|
|
"threshold": 0
|
|
},
|
|
"style": "diamond",
|
|
"template": " {{ .FormattedMs }} ",
|
|
"trailing_diamond": "\ue0b0",
|
|
"type": "executiontime"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "right",
|
|
"segments": [
|
|
{
|
|
"background": "#ee79d1",
|
|
"foreground": "#000000",
|
|
"leading_diamond": "",
|
|
"properties": {
|
|
"branch_icon": "\ue725 ",
|
|
"fetch_stash_count": true,
|
|
"fetch_status": true,
|
|
"fetch_upstream_icon": true,
|
|
"fetch_worktree_count": true
|
|
},
|
|
"style": "diamond",
|
|
"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 }} ",
|
|
"trailing_diamond": "\ue0b0",
|
|
"type": "git"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#91f2ff",
|
|
"style": "plain",
|
|
"template": "\u256d\u2500",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#91f2ff",
|
|
"foreground": "#000000",
|
|
"leading_diamond": "\ue0b2",
|
|
"style": "diamond",
|
|
"template": " \uf489 {{ .Name }} ",
|
|
"trailing_diamond": "<transparent,#91f2ff>\ue0b2</>",
|
|
"type": "shell"
|
|
},
|
|
{
|
|
"background": "#ff8c94",
|
|
"foreground": "#000000",
|
|
"leading_diamond": "\ue0b2",
|
|
"properties": {
|
|
"time_format": "3:04:05 PM | Monday"
|
|
},
|
|
"style": "diamond",
|
|
"template": " \ue641 {{ .CurrentDate | date .Format }} \uf073 ",
|
|
"trailing_diamond": "\ue0b0",
|
|
"type": "time"
|
|
},
|
|
{
|
|
"properties": {
|
|
"root_icon": "\uf292 "
|
|
},
|
|
"style": "diamond",
|
|
"template": " \uf0e7 ",
|
|
"type": "root"
|
|
},
|
|
{
|
|
"background": "#f8677b",
|
|
"foreground": "#000000",
|
|
"leading_diamond": "<transparent,#F8677b>\ue0b0</>",
|
|
"properties": {
|
|
"folder_icon": "\uf07b ",
|
|
"folder_separator_icon": " \uf061 ",
|
|
"home_icon": " ",
|
|
"style": "agnoster_full",
|
|
"template": " \ue5ff {{ .Path }} "
|
|
},
|
|
"style": "diamond",
|
|
"trailing_diamond": "",
|
|
"type": "path"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#00BCF9",
|
|
"foreground_templates": ["{{ if gt .Code 0 }}#ef5350{{ end }}"],
|
|
"properties": {
|
|
"always_enabled": true,
|
|
"template": "\u2570\u2500\ue285 "
|
|
},
|
|
"style": "plain",
|
|
"template": " ",
|
|
"type": "status"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
}
|
|
],
|
|
"console_title": true,
|
|
"console_title_style": "template",
|
|
|
|
"console_title_template": "{{ .Folder }}",
|
|
"transient_prompt": {
|
|
"background": "transparent",
|
|
"foreground": "#FEF5ED",
|
|
"template": "\ue285 "
|
|
},
|
|
"version": 2
|
|
}
|