|
7 | 7 | "type": "prompt",
|
8 | 8 | "alignment": "left",
|
9 | 9 | "segments": [
|
10 |
| - { |
11 |
| - "type": "root", |
12 |
| - "style": "plain", |
13 |
| - "foreground": "p:red", |
14 |
| - "template": "!" |
15 |
| - }, |
16 | 10 | {
|
17 | 11 | "type": "time",
|
18 | 12 | "style": "plain",
|
19 |
| - "foreground": "p:pink", |
| 13 | + "foreground": "p:blue", |
| 14 | + "template": "{{ .CurrentDate | date .Format }} ", |
20 | 15 | "properties": {
|
21 | 16 | "time_format": "15:04:05"
|
22 | 17 | }
|
23 | 18 | },
|
24 |
| - { |
25 |
| - "type": "os", |
26 |
| - "style": "plain", |
27 |
| - "foreground": "p:os", |
28 |
| - "template": "{{.Icon}} " |
29 |
| - }, |
30 | 19 | {
|
31 | 20 | "type": "python",
|
32 | 21 | "style": "plain",
|
33 | 22 | "foreground": "p:gold",
|
34 | 23 | "template": "{{ if .Error }}{{ .Error }}{{ else }}({{ if .Venv }}{{ .Venv }}{{ else }}cp{{ .Major }}{{ .Minor }}{{ end }}){{ end }} "
|
35 | 24 | },
|
36 |
| - { |
37 |
| - "type": "session", |
38 |
| - "style": "plain", |
39 |
| - "foreground": "p:blue", |
40 |
| - "template": "{{ .UserName }} " |
41 |
| - }, |
42 | 25 | {
|
43 | 26 | "type": "path",
|
44 | 27 | "style": "plain",
|
45 | 28 | "foreground": "p:pink",
|
46 | 29 | "template": "{{ path .Path .Location }} ",
|
47 | 30 | "properties": {
|
48 |
| - "folder_icon": "..\ue5fe..", |
| 31 | + "folder_icon": "...", |
49 | 32 | "home_icon": "~",
|
50 | 33 | "style": "agnoster_short"
|
51 | 34 | }
|
|
54 | 37 | "type": "git",
|
55 | 38 | "style": "plain",
|
56 | 39 | "foreground": "p:lavender",
|
57 |
| - "template": "{{ .HEAD }} ", |
| 40 | + "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 }} ", |
58 | 41 | "properties": {
|
59 | 42 | "branch_icon": "\ue725 ",
|
60 | 43 | "cherry_pick_icon": "\ue29b ",
|
61 | 44 | "commit_icon": "\uf417 ",
|
62 |
| - "fetch_status": false, |
63 |
| - "fetch_upstream_icon": false, |
| 45 | + "fetch_status": true, |
| 46 | + "fetch_stash_count": true, |
| 47 | + "fetch_upstream_icon": true, |
64 | 48 | "merge_icon": "\ue727 ",
|
65 | 49 | "no_commits_icon": "\uf0c3 ",
|
66 | 50 | "rebase_icon": "\ue728 ",
|
|
88 | 72 | "green"
|
89 | 73 | ],
|
90 | 74 | "properties": {
|
91 |
| - "status_template": "{{ if ne .Code 0 }}{{ .Code | hresult }}{{ end }}" |
| 75 | + "status_template": "{{ if ne .Code 0 }}{{ .Code | hresult }}{{ end }}" |
92 | 76 | }
|
93 | 77 | },
|
94 | 78 | {
|
95 | 79 | "type": "text",
|
96 | 80 | "style": "plain",
|
97 |
| - "foreground": "p:closer", |
98 |
| - "template": "\uf105" |
| 81 | + "foreground_templates": [ |
| 82 | + "{{ if .Root }}p:red{{ else }}p:closer{{ end }}" |
| 83 | + ], |
| 84 | + "template": "pwsh{{ if .Root }}#{{ else }}>{{ end }}" |
99 | 85 | }
|
100 | 86 | ]
|
101 | 87 | }
|
|
0 commit comments