refactor(git): no leading space on branch status

This commit is contained in:
Jan De Dobbeleer 2022-09-07 07:01:52 +02:00 committed by Jan De Dobbeleer
parent d087d8d392
commit 17f75fa1ff
52 changed files with 317 additions and 317 deletions

View file

@ -195,7 +195,7 @@ func TestSegmentTemplateMigration(t *testing.T) {
}{ }{
{ {
Case: "GIT", Case: "GIT",
Expected: " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} working {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", //nolint: lll Expected: " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} working {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", //nolint: lll
Type: GIT, Type: GIT,
Props: properties.Map{ Props: properties.Map{
"local_working_icon": " working ", "local_working_icon": " working ",
@ -207,7 +207,7 @@ func TestSegmentTemplateMigration(t *testing.T) {
}, },
{ {
Case: "GIT - Staging and Working Color", Case: "GIT - Staging and Working Color",
Expected: " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} working <#123456>{{ .Working.String }}</>{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged <#123456>{{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", //nolint: lll Expected: " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} working <#123456>{{ .Working.String }}</>{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged <#123456>{{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", //nolint: lll
Type: GIT, Type: GIT,
Props: properties.Map{ Props: properties.Map{
"local_working_icon": " working ", "local_working_icon": " working ",

View file

@ -244,19 +244,19 @@ func (g *Git) hasWorktree(gitdir *environment.FileInfo) bool {
func (g *Git) setBranchStatus() { func (g *Git) setBranchStatus() {
getBranchStatus := func() string { getBranchStatus := func() string {
if g.Ahead > 0 && g.Behind > 0 { if g.Ahead > 0 && g.Behind > 0 {
return fmt.Sprintf(" %s%d %s%d", g.props.GetString(BranchAheadIcon, "\u2191"), g.Ahead, g.props.GetString(BranchBehindIcon, "\u2193"), g.Behind) return fmt.Sprintf("%s%d %s%d", g.props.GetString(BranchAheadIcon, "\u2191"), g.Ahead, g.props.GetString(BranchBehindIcon, "\u2193"), g.Behind)
} }
if g.Ahead > 0 { if g.Ahead > 0 {
return fmt.Sprintf(" %s%d", g.props.GetString(BranchAheadIcon, "\u2191"), g.Ahead) return fmt.Sprintf("%s%d", g.props.GetString(BranchAheadIcon, "\u2191"), g.Ahead)
} }
if g.Behind > 0 { if g.Behind > 0 {
return fmt.Sprintf(" %s%d", g.props.GetString(BranchBehindIcon, "\u2193"), g.Behind) return fmt.Sprintf("%s%d", g.props.GetString(BranchBehindIcon, "\u2193"), g.Behind)
} }
if g.UpstreamGone { if g.UpstreamGone {
return fmt.Sprintf(" %s", g.props.GetString(BranchGoneIcon, "\u2262")) return g.props.GetString(BranchGoneIcon, "\u2262")
} }
if g.Behind == 0 && g.Ahead == 0 && g.Upstream != "" { if g.Behind == 0 && g.Ahead == 0 && g.Upstream != "" {
return fmt.Sprintf(" %s", g.props.GetString(BranchIdenticalIcon, "\u2261")) return g.props.GetString(BranchIdenticalIcon, "\u2261")
} }
return "" return ""
} }

View file

@ -564,11 +564,11 @@ func TestGetBranchStatus(t *testing.T) {
Upstream string Upstream string
UpstreamGone bool UpstreamGone bool
}{ }{
{Case: "Equal with remote", Expected: " equal", Upstream: branchName}, {Case: "Equal with remote", Expected: "equal", Upstream: branchName},
{Case: "Ahead", Expected: " up2", Ahead: 2}, {Case: "Ahead", Expected: "up2", Ahead: 2},
{Case: "Behind", Expected: " down8", Behind: 8}, {Case: "Behind", Expected: "down8", Behind: 8},
{Case: "Behind and ahead", Expected: " up7 down8", Behind: 8, Ahead: 7}, {Case: "Behind and ahead", Expected: "up7 down8", Behind: 8, Ahead: 7},
{Case: "Gone", Expected: " gone", Upstream: branchName, UpstreamGone: true}, {Case: "Gone", Expected: "gone", Upstream: branchName, UpstreamGone: true},
{Case: "No remote", Expected: "", Upstream: ""}, {Case: "No remote", Expected: "", Upstream: ""},
{Case: "Default (bug)", Expected: "", Behind: -8, Upstream: "wonky"}, {Case: "Default (bug)", Expected: "", Behind: -8, Upstream: "wonky"},
} }

View file

@ -44,7 +44,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "git" "type": "git"
}, },

View file

@ -44,7 +44,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "git" "type": "git"
}, },

View file

@ -34,7 +34,7 @@
"fetch_worktree_count": true "fetch_worktree_count": true
}, },
"style": "diamond", "style": "diamond",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
} }
], ],

View file

@ -48,7 +48,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#ef5350> \uf046 {{ .Staging.String }}</>{{ end }} ", "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#ef5350> \uf046 {{ .Staging.String }}</>{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -33,7 +33,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "diamond", "style": "diamond",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "git" "type": "git"
}, },

View file

@ -30,7 +30,7 @@
"foreground": "p:c-badge-text", "foreground": "p:c-badge-text",
"leading_diamond": " \uE0B6", "leading_diamond": " \uE0B6",
"style": "diamond", "style": "diamond",
"template": "{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uE0B1 \uF448 ({{ .Working.String }}){{ end }}{{ if and .Working.Changed .Staging.Changed }} \uE621 {{ end }}{{ if .Staging.Changed }}{{ if not .Working.Changed }} \uE0B1 {{ end }}\uF854 ({{ .Staging.String }}){{ end }}{{ if .StashCount }} \uE621 \uF6FC {{ .StashCount }} Stash{{ if gt .StashCount 1 }}es{{ end }}{{ end }}", "template": "{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uE0B1 \uF448 ({{ .Working.String }}){{ end }}{{ if and .Working.Changed .Staging.Changed }} \uE621 {{ end }}{{ if .Staging.Changed }}{{ if not .Working.Changed }} \uE0B1 {{ end }}\uF854 ({{ .Staging.String }}){{ end }}{{ if .StashCount }} \uE621 \uF6FC {{ .StashCount }} Stash{{ if gt .StashCount 1 }}es{{ end }}{{ end }}",
"properties": { "properties": {
"branch_icon": "\uE0A0 ", "branch_icon": "\uE0A0 ",
"branch_ahead_icon": "\uE621 \uF9AC ", "branch_ahead_icon": "\uE621 \uF9AC ",

View file

@ -75,7 +75,7 @@
"fetch_worktree_count": true "fetch_worktree_count": true
}, },
"style": "diamond", "style": "diamond",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b0", "trailing_diamond": "\ue0b0",
"type": "git" "type": "git"
} }

View file

@ -40,7 +40,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -50,7 +50,7 @@
"github_icon": "\uf7a3" "github_icon": "\uf7a3"
}, },
"style": "powerline", "style": "powerline",
"template": " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ", "template": " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -174,7 +174,7 @@ blocks:
fetch_status: true fetch_status: true
fetch_upstream_icon: true fetch_upstream_icon: true
fetch_worktree_count: true fetch_worktree_count: true
template: "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}" template: "{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}"
- type: prompt - type: prompt
alignment: left alignment: left
newline: true newline: true

View file

@ -25,7 +25,7 @@
"fetch_status": true "fetch_status": true
}, },
"style": "plain", "style": "plain",
"template": "<#ffffff>on</> {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ", "template": "<#ffffff>on</> {{ .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 }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -66,7 +66,7 @@
"fetch_status": true, "fetch_status": true,
"fetch_upstream_icon": 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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "git" "type": "git"
} }
@ -153,4 +153,4 @@
], ],
"final_space": true, "final_space": true,
"version": 2 "version": 2
} }

View file

@ -1,117 +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", "alignment": "left",
"segments": [ "segments": [
{ {
"foreground": "#E5C07B", "foreground": "#E5C07B",
"properties": { "properties": {
"time_format": "15:04" "time_format": "15:04"
}, },
"style": "plain", "style": "plain",
"template": "[{{ .CurrentDate | date .Format }}]", "template": "[{{ .CurrentDate | date .Format }}]",
"type": "time" "type": "time"
}, },
{ {
"type": "shell", "type": "shell",
"style": "plain", "style": "plain",
"foreground": "#E06C75", "foreground": "#E06C75",
"properties": { "properties": {
"mapped_shell_names": { "mapped_shell_names": {
"pwsh": "Shell", "pwsh": "Shell",
"powershell": "Shell", "powershell": "Shell",
"cmd": "Cmd", "cmd": "Cmd",
"bash": "Bash" "bash": "Bash"
} }
}, },
"template": " \ue795 {{ .Name }}" "template": " \ue795 {{ .Name }}"
}, },
{ {
"foreground": "#F3C267", "foreground": "#F3C267",
"foreground_templates": [ "foreground_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}", "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}", "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
"{{ if gt .Ahead 0 }}#B388FF{{ end }}", "{{ if gt .Ahead 0 }}#B388FF{{ end }}",
"{{ if gt .Behind 0 }}#B388FF{{ end }}" "{{ if gt .Behind 0 }}#B388FF{{ end }}"
], ],
"properties": { "properties": {
"branch_max_length": 25, "branch_max_length": 25,
"fetch_stash_count": true, "fetch_stash_count": true,
"fetch_status": true, "fetch_status": true,
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "plain", "style": "plain",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
} }
], ],
"type": "prompt" "type": "prompt"
}, },
{ {
"alignment": "right", "alignment": "right",
"segments": [ "segments": [
{ {
"type": "exit", "type": "exit",
"style": "plain", "style": "plain",
"foreground": "#b8ff75", "foreground": "#b8ff75",
"foreground_templates": [ "foreground_templates": [
"{{ if gt .Code 0 }}#E06C75{{ end }}" "{{ if gt .Code 0 }}#E06C75{{ end }}"
], ],
"template": " x{{ .Meaning }}" "template": " x{{ .Meaning }}"
}, },
{ {
"foreground": "#b8ff75", "foreground": "#b8ff75",
"foreground_templates": [ "foreground_templates": [
"{{ if gt .Code 0 }}#E06C75{{ end }}" "{{ if gt .Code 0 }}#E06C75{{ end }}"
], ],
"properties": { "properties": {
"style": "roundrock", "style": "roundrock",
"always_enabled": true "always_enabled": true
}, },
"style": "diamond", "style": "diamond",
"template": " {{ .FormattedMs }} ", "template": " {{ .FormattedMs }} ",
"type": "executiontime" "type": "executiontime"
} }
], ],
"type": "prompt" "type": "prompt"
}, },
{ {
"alignment": "left", "alignment": "left",
"newline": true, "newline": true,
"segments": [ "segments": [
{ {
"foreground": "#61AFEF", "foreground": "#61AFEF",
"properties": { "properties": {
"style": "full" "style": "full"
}, },
"style": "plain", "style": "plain",
"template": "\ue5ff {{ .Path }}", "template": "\ue5ff {{ .Path }}",
"type": "path" "type": "path"
} }
], ],
"type": "prompt" "type": "prompt"
}, },
{ {
"alignment": "left", "alignment": "left",
"newline": true, "newline": true,
"segments": [ "segments": [
{ {
"foreground": "#E06C75", "foreground": "#E06C75",
"style": "plain", "style": "plain",
"template": "\u0021", "template": "\u0021",
"type": "root" "type": "root"
}, },
{ {
"foreground": "#E06C75", "foreground": "#E06C75",
"style": "plain", "style": "plain",
"template": "\u276f", "template": "\u276f",
"type": "text" "type": "text"
} }
], ],
"type": "prompt" "type": "prompt"
} }
], ],
"final_space": true, "final_space": true,
"version": 2 "version": 2
} }

View file

@ -52,7 +52,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"template": " \uf1d3 {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}}\uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ", "template": " \uf1d3 {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}}\uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -1,135 +1,135 @@
{ {
"$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", "alignment": "left",
"segments": [ "segments": [
{ {
"background": "#3A3A3A", "background": "#3A3A3A",
"foreground": "#ffffff", "foreground": "#ffffff",
"style": "powerline", "style": "powerline",
"template": "{{ if .WSL }}WSL at{{ end }} {{.Icon}} ", "template": "{{ if .WSL }}WSL at{{ end }} {{.Icon}} ",
"type": "os" "type": "os"
}, },
{ {
"background": "#458588", "background": "#458588",
"foreground": "#282828", "foreground": "#282828",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"style": "full" "style": "full"
}, },
"style": "powerline", "style": "powerline",
"template": " {{ .Path }} ", "template": " {{ .Path }} ",
"type": "path" "type": "path"
}, },
{ {
"background": "#98971A", "background": "#98971A",
"background_templates": [ "background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}", "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}", "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
"{{ if gt .Ahead 0 }}#B388FF{{ end }}", "{{ if gt .Ahead 0 }}#B388FF{{ end }}",
"{{ if gt .Behind 0 }}#B388FF{{ end }}" "{{ if gt .Behind 0 }}#B388FF{{ end }}"
], ],
"foreground": "#282828", "foreground": "#282828",
"leading_diamond": "\ue0b6", "leading_diamond": "\ue0b6",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"branch_max_length": 25, "branch_max_length": 25,
"fetch_stash_count": true, "fetch_stash_count": true,
"fetch_status": true, "fetch_status": true,
"branch_icon": "\uE0A0 ", "branch_icon": "\uE0A0 ",
"branch_identical_icon": "\u25CF" "branch_identical_icon": "\u25CF"
}, },
"style": "powerline", "style": "powerline",
"template": " {{ .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 }} ", "template": " {{ .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 }} \uf692 {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "git" "type": "git"
}, },
{ {
"background": "#8ED1F7", "background": "#8ED1F7",
"foreground": "#111111", "foreground": "#111111",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"fetch_version": true "fetch_version": true
}, },
"style": "powerline", "style": "powerline",
"template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ", "template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "go" "type": "go"
}, },
{ {
"background": "#4063D8", "background": "#4063D8",
"foreground": "#111111", "foreground": "#111111",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"fetch_version": true "fetch_version": true
}, },
"style": "powerline", "style": "powerline",
"template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ", "template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "julia" "type": "julia"
}, },
{ {
"background": "#FFDE57", "background": "#FFDE57",
"foreground": "#111111", "foreground": "#111111",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_mode": "files", "display_mode": "files",
"fetch_virtual_env": false "fetch_virtual_env": false
}, },
"style": "powerline", "style": "powerline",
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ", "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "python" "type": "python"
}, },
{ {
"background": "#AE1401", "background": "#AE1401",
"foreground": "#ffffff", "foreground": "#ffffff",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_mode": "files", "display_mode": "files",
"fetch_version": true "fetch_version": true
}, },
"style": "powerline", "style": "powerline",
"template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ", "template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "ruby" "type": "ruby"
}, },
{ {
"background": "#FEAC19", "background": "#FEAC19",
"foreground": "#ffffff", "foreground": "#ffffff",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_mode": "files", "display_mode": "files",
"fetch_version": false "fetch_version": false
}, },
"style": "powerline", "style": "powerline",
"template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ", "template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "azfunc" "type": "azfunc"
}, },
{ {
"background_templates": [ "background_templates": [
"{{if contains \"default\" .Profile}}#FFA400{{end}}", "{{if contains \"default\" .Profile}}#FFA400{{end}}",
"{{if contains \"jan\" .Profile}}#f1184c{{end}}" "{{if contains \"jan\" .Profile}}#f1184c{{end}}"
], ],
"foreground": "#ffffff", "foreground": "#ffffff",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_default": false "display_default": false
}, },
"style": "powerline", "style": "powerline",
"template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ", "template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
"type": "aws" "type": "aws"
}, },
{ {
"background": "#ffff66", "background": "#ffff66",
"foreground": "#111111", "foreground": "#111111",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"style": "powerline", "style": "powerline",
"template": " \uf0ad ", "template": " \uf0ad ",
"type": "root" "type": "root"
} }
], ],
"type": "prompt" "type": "prompt"
} }
], ],
"console_title_template": "{{ .Folder }}", "console_title_template": "{{ .Folder }}",
"final_space": true, "final_space": true,
"version": 2 "version": 2
} }

View file

@ -79,7 +79,7 @@
"fetch_worktree_count": true "fetch_worktree_count": true
}, },
"style": "diamond", "style": "diamond",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b0", "trailing_diamond": "\ue0b0",
"type": "git" "type": "git"
} }

View file

@ -44,7 +44,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "git" "type": "git"
}, },

View file

@ -51,7 +51,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -72,7 +72,7 @@
"fetch_worktree_count": true "fetch_worktree_count": true
}, },
"style": "powerline", "style": "powerline",
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#CAEBE1> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ", "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#CAEBE1> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
} }
], ],

View file

@ -43,7 +43,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -33,7 +33,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ", "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -68,7 +68,7 @@
"tag_icon": "\uf412 " "tag_icon": "\uf412 "
}, },
"style": "powerline", "style": "powerline",
"template": " {{ if( .UpstreamIcon ) }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} <#ed1941>\uf044 {{.Working.String}}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#225a1f>\uf046 {{.Staging.String}}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{.StashCount}}{{ end }}{{ if gt .WorktreeCount 0 }}{{if .IsWorkTree}}<#1d953f>{{ end }} \uf1bb {{if .IsWorkTree}}</>{{ end }}{{.WorktreeCount}}{{ end }} ", "template": " {{ if( .UpstreamIcon ) }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} <#ed1941>\uf044 {{.Working.String}}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#225a1f>\uf046 {{.Staging.String}}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{.StashCount}}{{ end }}{{ if gt .WorktreeCount 0 }}{{if .IsWorkTree}}<#1d953f>{{ end }} \uf1bb {{if .IsWorkTree}}</>{{ end }}{{.WorktreeCount}}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -73,7 +73,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ", "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -33,11 +33,11 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "diamond", "style": "diamond",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "git" "type": "git"
}, },
{ {
"foreground": "#C94A16", "foreground": "#C94A16",
"style": "plain", "style": "plain",
@ -50,7 +50,7 @@
{ {
"alignment": "right", "alignment": "right",
"segments": [ "segments": [
{ {
"foreground": "#5fb157", "foreground": "#5fb157",
"properties": { "properties": {

View file

@ -25,7 +25,7 @@
"fetch_status": true "fetch_status": true
}, },
"style": "plain", "style": "plain",
"template": ":: {{ .HEAD }}{{ .BranchStatus }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }} ", "template": ":: {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }} ",
"type": "git" "type": "git"
} }
], ],

View file

@ -58,7 +58,7 @@
"fetch_worktree_count": true "fetch_worktree_count": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -18,7 +18,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "plain", "style": "plain",
"template": "<#5e81ac>--[</>{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#8fbcbb> \u25cf </>{{ end }}{{ if .Staging.Changed }}<#88c0d0> \u25cf </>{{ end }}<#5e81ac>]</>", "template": "<#5e81ac>--[</>{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#8fbcbb> \u25cf </>{{ end }}{{ if .Staging.Changed }}<#88c0d0> \u25cf </>{{ end }}<#5e81ac>]</>",
"type": "git" "type": "git"
}, },
{ {

View file

@ -39,7 +39,7 @@
"github_icon": "\uf408 " "github_icon": "\uf408 "
}, },
"style": "plain", "style": "plain",
"template": " on {{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<red> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<yellow> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }}", "template": " on {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<red> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<yellow> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }}",
"type": "git" "type": "git"
}, },
{ {

View file

@ -34,7 +34,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "plain", "style": "plain",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
} }
], ],

View file

@ -113,7 +113,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "diamond", "style": "diamond",
"template": "<#ffea00>\ue0b1 </>{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ 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 }} \uf692 {{ .StashCount }}{{ end }} ", "template": "<#ffea00>\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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -43,7 +43,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"template": " \uf113 {{ .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 }} ", "template": " \uf113 {{ .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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
} }
], ],

View file

@ -41,7 +41,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
} }
], ],

View file

@ -37,7 +37,7 @@
"github_icon": "" "github_icon": ""
}, },
"style": "plain", "style": "plain",
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#FFAFD7>*</>{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ", "template": "{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#FFAFD7>*</>{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
} }
], ],

View file

@ -48,7 +48,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "plain", "style": "plain",
"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 }} ]", "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 }} \uf692 {{ .StashCount }}{{ end }} ]",
"type": "git" "type": "git"
}, },
{ {

View file

@ -38,7 +38,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "plain", "style": "plain",
"template": " [{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#BD6200> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#053F22> \uf046 {{ .Staging.String }}</>{{ end }}] ", "template": " [{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#BD6200> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#053F22> \uf046 {{ .Staging.String }}</>{{ end }}] ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -70,7 +70,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "diamond", "style": "diamond",
"template": "<#7a7a7a>\ue0b1 </>{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ 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 }} \uf692 {{ .StashCount }}{{ end }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -68,7 +68,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "diamond", "style": "diamond",
"template": "<#7a7a7a>\ue0b1 </>{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ 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 }} \uf692 {{ .StashCount }}{{ end }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -30,7 +30,7 @@
"fetch_status": true "fetch_status": true
}, },
"style": "plain", "style": "plain",
"template": "\u27e8{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \u2206{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}\u27e9", "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" "type": "git"
}, },
{ {

View file

@ -25,7 +25,7 @@
"fetch_status": true "fetch_status": true
}, },
"style": "plain", "style": "plain",
"template": "<#ffffff>on</> {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ", "template": "<#ffffff>on</> {{ .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 }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -39,7 +39,7 @@
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}", "{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
"{{ if gt .Behind 0 }}#c5b6ad{{ end }}" "{{ if gt .Behind 0 }}#c5b6ad{{ end }}"
], ],
"template": " {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} \u2502{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }} ", "template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} \u2502{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }} ",
"properties": { "properties": {
"branch_ahead_icon": "\u2191", "branch_ahead_icon": "\u2191",
"branch_behind_icon": "\u2193", "branch_behind_icon": "\u2193",

View file

@ -75,7 +75,7 @@
"tag_icon": "\u25b6 " "tag_icon": "\u25b6 "
}, },
"style": "powerline", "style": "powerline",
"template": " {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} \u2502{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }} ", "template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} \u2502{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -19,7 +19,7 @@
"branch_icon": "\ue0a0 " "branch_icon": "\ue0a0 "
}, },
"style": "plain", "style": "plain",
"template": "<#F3EFF5>on</> {{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ", "template": "<#F3EFF5>on</> {{ .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 }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -40,7 +40,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -51,7 +51,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "plain", "style": "plain",
"template": "[<#ffffff>{{ .UpstreamIcon }}</>{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} <#ffffff>\uf044</> {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#ffffff>\uf046</> {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} <#ffffff>\uf692</> {{ .StashCount }}{{ end }}]", "template": "[<#ffffff>{{ .UpstreamIcon }}</>{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} <#ffffff>\uf044</> {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#ffffff>\uf046</> {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} <#ffffff>\uf692</> {{ .StashCount }}{{ end }}]",
"type": "git" "type": "git"
}, },
{ {

View file

@ -43,7 +43,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -48,7 +48,7 @@
"fetch_upstream_icon": true "fetch_upstream_icon": true
}, },
"style": "powerline", "style": "powerline",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git" "type": "git"
}, },
{ {

View file

@ -91,7 +91,7 @@
"fetch_worktree_count": true "fetch_worktree_count": true
}, },
"style": "diamond", "style": "diamond",
"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 }} ", "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 }} \uf692 {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b0", "trailing_diamond": "\ue0b0",
"type": "git" "type": "git"
} }

View file

@ -76,7 +76,7 @@ import TabItem from "@theme/TabItem"
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}" "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}"
], ],
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"template": " {{ .HEAD }}{{ .BranchStatus }} ", "template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }} ",
"properties": { "properties": {
"branch_max_length": 25, "branch_max_length": 25,
"fetch_status": true "fetch_status": true
@ -151,7 +151,7 @@ blocks:
foreground_templates: foreground_templates:
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}" - "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}"
powerline_symbol: "\ue0b0" powerline_symbol: "\ue0b0"
template: " {{ .HEAD }}{{ .BranchStatus }} " template: " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }} "
properties: properties:
branch_max_length: 25 branch_max_length: 25
fetch_status: true fetch_status: true
@ -229,7 +229,7 @@ type = "prompt"
foreground = "#193549" foreground = "#193549"
foreground_templates = [ "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}" ] foreground_templates = [ "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}" ]
powerline_symbol = "\ue0b0" powerline_symbol = "\ue0b0"
template = " {{ .HEAD }}{{ .BranchStatus }} " template = " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }} "
style = "powerline" style = "powerline"
type = "git" type = "git"

View file

@ -43,7 +43,7 @@ An alternative is to use the [Posh-Git segment][poshgit].
"{{ if gt .Ahead 0 }}#B388FF{{ end }}", "{{ if gt .Ahead 0 }}#B388FF{{ end }}",
"{{ if gt .Behind 0 }}#B388FB{{ end }}" "{{ if gt .Behind 0 }}#B388FB{{ end }}"
], ],
"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 }}", "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 }} \uF692 {{ .StashCount }}{{ end }}",
"properties": { "properties": {
"fetch_status": true, "fetch_status": true,
"fetch_stash_count": true, "fetch_stash_count": true,
@ -108,7 +108,7 @@ instead of the repo path.
:::note default template :::note default template
``` template ``` template
{{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }}
``` ```
::: :::