theme(thecyberden): add background_templates to git segment

This commit is contained in:
Juan Svaikauskas 2022-02-27 13:20:55 -05:00 committed by GitHub
parent 7aafc96e7d
commit 409abd6001
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,111 +1,117 @@
{ {
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [ "blocks": [
{
"alignment": "left",
"segments": [
{ {
"background": "#2e9599", "alignment": "left",
"foreground": "#ffffff", "segments": [
"leading_diamond": "\ue0b6", {
"powerline_symbol": "\ue0b0", "background": "#2e9599",
"properties": { "foreground": "#ffffff",
"template": "\ufcbe {{ .HostName }} " "leading_diamond": "\ue0b6",
}, "powerline_symbol": "\ue0b0",
"style": "diamond", "properties": {
"type": "session" "template": "\ufcbe {{ .HostName }} "
},
"style": "diamond",
"type": "session"
},
{
"background": "#0080ff",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"style": "full",
"template": " \ue5ff {{ .Path }} "
},
"style": "powerline",
"type": "path"
},
{
"background": "#c19c00",
"foreground": "#000000",
"powerline_symbol": "\ue0b0",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FFEB3B{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFA300{{ end }}",
"{{ if gt .Ahead 0 }}#FF7070{{ end }}",
"{{ if gt .Behind 0 }}#90F090{{ end }}"
],
"properties": {
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ 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 }} \uf692 {{ .StashCount }}{{ end }} "
},
"style": "powerline",
"type": "git"
},
{
"background": "#2e9599",
"background_templates": [
"{{ if gt .Code 0 }}#f1184c{{ end }}"
],
"foreground": "#ffffff",
"properties": {
"always_enabled": true,
"template": " "
},
"style": "diamond",
"trailing_diamond": "\ue0b4",
"type": "exit"
}
],
"type": "prompt"
}, },
{ {
"background": "#0080ff", "alignment": "right",
"foreground": "#ffffff", "segments": [
"powerline_symbol": "\ue0b0", {
"properties": { "background": "#2e9599",
"style": "full", "foreground": "#ffffff",
"template": " \ue5ff {{ .Path }} " "leading_diamond": "\ue0b6",
}, "properties": {
"style": "powerline", "template": " {{ .CurrentDate | date .Format }} ",
"type": "path" "time_format": "15:04:05"
},
"style": "diamond",
"trailing_diamond": "\ue0b4",
"type": "time"
}
],
"type": "prompt"
}, },
{ {
"background": "#c19c00", "alignment": "left",
"foreground": "#193549", "newline": true,
"powerline_symbol": "\ue0b0", "segments": [
"properties": { {
"fetch_stash_count": true, "foreground": "#ff0000",
"fetch_status": true, "properties": {
"fetch_upstream_icon": true, "template": "\ue00a "
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ 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 }} \uf692 {{ .StashCount }}{{ end }} " },
}, "style": "plain",
"style": "powerline", "type": "root"
"type": "git" },
}, {
{ "foreground": "#ffffff",
"background": "#2e9599", "properties": {
"background_templates": [ "template": " {{ .Name }} "
"{{ if gt .Code 0 }}#f1184c{{ end }}" },
], "style": "plain",
"foreground": "#ffffff", "type": "shell"
"properties": { },
"always_enabled": true, {
"template": " " "foreground": "#ffffff",
}, "properties": {
"style": "diamond", "template": "\uf054 "
"trailing_diamond": "\ue0b4", },
"type": "exit" "style": "plain",
"type": "text"
}
],
"type": "prompt"
} }
], ],
"type": "prompt" "console_title_style": "folder",
}, "version": 1
{
"alignment": "right",
"segments": [
{
"background": "#2e9599",
"foreground": "#ffffff",
"leading_diamond": "\ue0b6",
"properties": {
"template": " {{ .CurrentDate | date .Format }} ",
"time_format": "15:04:05"
},
"style": "diamond",
"trailing_diamond": "\ue0b4",
"type": "time"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#ff0000",
"properties": {
"template": "\ue00a "
},
"style": "plain",
"type": "root"
},
{
"foreground": "#ffffff",
"properties": {
"template": " {{ .Name }} "
},
"style": "plain",
"type": "shell"
},
{
"foreground": "#ffffff",
"properties": {
"template": "\uf054 "
},
"style": "plain",
"type": "text"
}
],
"type": "prompt"
}
],
"console_title_style": "folder",
"version": 1
} }