fix(migration): do not export Enabled field in a segment

This commit is contained in:
L. Yeung 2022-05-10 10:10:01 +08:00 committed by Jan De Dobbeleer
parent 2d90ce7cbe
commit bf7bca4764
5 changed files with 93 additions and 132 deletions

View file

@ -30,7 +30,7 @@ type Segment struct {
Properties properties.Map `json:"properties,omitempty"` Properties properties.Map `json:"properties,omitempty"`
writer SegmentWriter writer SegmentWriter
Enabled bool Enabled bool `json:"-"`
text string text string
env environment.Environment env environment.Environment
backgroundCache string backgroundCache string

View file

@ -8,10 +8,8 @@
"background": "p:session", "background": "p:session",
"foreground": "p:white", "foreground": "p:white",
"leading_diamond": "\ue0b6", "leading_diamond": "\ue0b6",
"properties": {
"template": " {{ .UserName }} "
},
"style": "diamond", "style": "diamond",
"template": " {{ .UserName }} ",
"trailing_diamond": "\ue0b0", "trailing_diamond": "\ue0b0",
"type": "session" "type": "session"
}, },
@ -22,10 +20,10 @@
"properties": { "properties": {
"folder_separator_icon": " \ue0b1 ", "folder_separator_icon": " \ue0b1 ",
"home_icon": "~", "home_icon": "~",
"style": "folder", "style": "folder"
"template": " \uf74a {{ .Path }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \uf74a {{ .Path }} ",
"type": "path" "type": "path"
}, },
{ {
@ -43,10 +41,10 @@
"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
"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", "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 }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "git" "type": "git"
}, },
@ -55,10 +53,10 @@
"foreground": "p:white", "foreground": "p:white",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"fetch_version": true, "fetch_version": true
"template": " \uf898 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \uf898 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
"type": "node" "type": "node"
}, },
{ {
@ -66,10 +64,10 @@
"foreground": "p:black", "foreground": "p:black",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"fetch_version": true, "fetch_version": true
"template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "go" "type": "go"
}, },
{ {
@ -77,10 +75,10 @@
"foreground": "p:black", "foreground": "p:black",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"fetch_version": true, "fetch_version": true
"template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "julia" "type": "julia"
}, },
{ {
@ -89,10 +87,10 @@
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_mode": "files", "display_mode": "files",
"fetch_virtual_env": false, "fetch_virtual_env": false
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "python" "type": "python"
}, },
{ {
@ -101,10 +99,10 @@
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_mode": "files", "display_mode": "files",
"fetch_version": true, "fetch_version": true
"template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "ruby" "type": "ruby"
}, },
{ {
@ -113,10 +111,10 @@
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_mode": "files", "display_mode": "files",
"fetch_version": false, "fetch_version": false
"template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "azfunc" "type": "azfunc"
}, },
{ {
@ -127,30 +125,28 @@
"foreground": "p:white", "foreground": "p:white",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_default": false, "display_default": false
"template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
"type": "aws" "type": "aws"
}, },
{ {
"background": "p:root", "background": "p:root",
"foreground": "p:black", "foreground": "p:black",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": {
"template": " \uf0ad "
},
"style": "powerline", "style": "powerline",
"template": " \uf0ad ",
"type": "root" "type": "root"
}, },
{ {
"background": "p:executiontime", "background": "p:executiontime",
"foreground": "p:white", "foreground": "p:white",
"properties": { "properties": {
"always_enabled": true, "always_enabled": true
"template": "<transparent>\ue0b0</> \ufbab{{ .FormattedMs }}\u2800"
}, },
"style": "plain", "style": "plain",
"template": "<transparent>\ue0b0</> \ufbab{{ .FormattedMs }}\u2800",
"type": "executiontime" "type": "executiontime"
}, },
{ {
@ -160,10 +156,10 @@
], ],
"foreground": "p:white", "foreground": "p:white",
"properties": { "properties": {
"always_enabled": true, "always_enabled": true
"template": "<parentBackground>\ue0b0</> \ue23a "
}, },
"style": "diamond", "style": "diamond",
"template": "<parentBackground>\ue0b0</> \ue23a ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "exit" "type": "exit"
} }
@ -175,10 +171,8 @@
{ {
"background": "p:shell", "background": "p:shell",
"foreground": "p:white", "foreground": "p:white",
"properties": {
"template": "<#0077c2,transparent>\ue0b6</> \uf489 {{ .Name }} <transparent,#0077c2>\ue0b2</>"
},
"style": "plain", "style": "plain",
"template": "<#0077c2,transparent>\ue0b6</> \uf489 {{ .Name }} <transparent,#0077c2>\ue0b2</>",
"type": "shell" "type": "shell"
}, },
{ {
@ -188,10 +182,10 @@
"powerline_symbol": "\ue0b2", "powerline_symbol": "\ue0b2",
"properties": { "properties": {
"paused_icon": "\uf04c ", "paused_icon": "\uf04c ",
"playing_icon": "\uf04b ", "playing_icon": "\uf04b "
"template": " \uf167 {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \uf167 {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }} ",
"type": "ytm" "type": "ytm"
}, },
{ {
@ -207,10 +201,10 @@
"properties": { "properties": {
"charged_icon": "\ue22f ", "charged_icon": "\ue22f ",
"charging_icon": "\ue234 ", "charging_icon": "\ue234 ",
"discharging_icon": "\ue231 ", "discharging_icon": "\ue231 "
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 "
}, },
"style": "powerline", "style": "powerline",
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 ",
"type": "battery" "type": "battery"
}, },
{ {
@ -218,10 +212,8 @@
"foreground": "p:black", "foreground": "p:black",
"invert_powerline": true, "invert_powerline": true,
"leading_diamond": "\ue0b2", "leading_diamond": "\ue0b2",
"properties": {
"template": " {{ .CurrentDate | date .Format }} "
},
"style": "diamond", "style": "diamond",
"template": " {{ .CurrentDate | date .Format }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "time" "type": "time"
} }
@ -262,5 +254,5 @@
"white": "#FFFFFF", "white": "#FFFFFF",
"ytm": "#1BD760" "ytm": "#1BD760"
}, },
"version": 1 "version": 2
} }

View file

@ -8,10 +8,8 @@
"background": "#c386f1", "background": "#c386f1",
"foreground": "#ffffff", "foreground": "#ffffff",
"leading_diamond": "\ue0b6", "leading_diamond": "\ue0b6",
"properties": {
"template": " {{ .UserName }} "
},
"style": "diamond", "style": "diamond",
"template": " {{ .UserName }} ",
"trailing_diamond": "\ue0b0", "trailing_diamond": "\ue0b0",
"type": "session" "type": "session"
}, },
@ -22,10 +20,10 @@
"properties": { "properties": {
"folder_separator_icon": " \ue0b1 ", "folder_separator_icon": " \ue0b1 ",
"home_icon": "~", "home_icon": "~",
"style": "folder", "style": "folder"
"template": " \uf74a {{ .Path }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \uf74a {{ .Path }} ",
"type": "path" "type": "path"
}, },
{ {
@ -43,10 +41,10 @@
"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
"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", "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 }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "git" "type": "git"
}, },
@ -55,10 +53,10 @@
"foreground": "#ffffff", "foreground": "#ffffff",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"fetch_version": true, "fetch_version": true
"template": " \uf898 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \uf898 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
"type": "node" "type": "node"
}, },
{ {
@ -66,10 +64,10 @@
"foreground": "#111111", "foreground": "#111111",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"fetch_version": true, "fetch_version": true
"template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "go" "type": "go"
}, },
{ {
@ -77,10 +75,10 @@
"foreground": "#111111", "foreground": "#111111",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"fetch_version": true, "fetch_version": true
"template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \ue624 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "julia" "type": "julia"
}, },
{ {
@ -89,10 +87,10 @@
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_mode": "files", "display_mode": "files",
"fetch_virtual_env": false, "fetch_virtual_env": false
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "python" "type": "python"
}, },
{ {
@ -101,10 +99,10 @@
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_mode": "files", "display_mode": "files",
"fetch_version": true, "fetch_version": true
"template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \ue791 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "ruby" "type": "ruby"
}, },
{ {
@ -113,10 +111,10 @@
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_mode": "files", "display_mode": "files",
"fetch_version": false, "fetch_version": false
"template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \uf0e7{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "azfunc" "type": "azfunc"
}, },
{ {
@ -127,30 +125,28 @@
"foreground": "#ffffff", "foreground": "#ffffff",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"display_default": false, "display_default": false
"template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"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",
"properties": {
"template": " \uf0ad "
},
"style": "powerline", "style": "powerline",
"template": " \uf0ad ",
"type": "root" "type": "root"
}, },
{ {
"background": "#83769c", "background": "#83769c",
"foreground": "#ffffff", "foreground": "#ffffff",
"properties": { "properties": {
"always_enabled": true, "always_enabled": true
"template": "<transparent>\ue0b0</> \ufbab{{ .FormattedMs }}\u2800"
}, },
"style": "plain", "style": "plain",
"template": "<transparent>\ue0b0</> \ufbab{{ .FormattedMs }}\u2800",
"type": "executiontime" "type": "executiontime"
}, },
{ {
@ -160,10 +156,10 @@
], ],
"foreground": "#ffffff", "foreground": "#ffffff",
"properties": { "properties": {
"always_enabled": true, "always_enabled": true
"template": "<parentBackground>\ue0b0</> \ue23a "
}, },
"style": "diamond", "style": "diamond",
"template": "<parentBackground>\ue0b0</> \ue23a ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "exit" "type": "exit"
} }
@ -175,10 +171,8 @@
{ {
"background": "#0077c2", "background": "#0077c2",
"foreground": "#ffffff", "foreground": "#ffffff",
"properties": {
"template": "<#0077c2,transparent>\ue0b6</> \uf489 {{ .Name }} <transparent,#0077c2>\ue0b2</>"
},
"style": "plain", "style": "plain",
"template": "<#0077c2,transparent>\ue0b6</> \uf489 {{ .Name }} <transparent,#0077c2>\ue0b2</>",
"type": "shell" "type": "shell"
}, },
{ {
@ -188,10 +182,10 @@
"powerline_symbol": "\ue0b2", "powerline_symbol": "\ue0b2",
"properties": { "properties": {
"paused_icon": "\uf04c ", "paused_icon": "\uf04c ",
"playing_icon": "\uf04b ", "playing_icon": "\uf04b "
"template": " \uf167 {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }} "
}, },
"style": "powerline", "style": "powerline",
"template": " \uf167 {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }} ",
"type": "ytm" "type": "ytm"
}, },
{ {
@ -207,10 +201,10 @@
"properties": { "properties": {
"charged_icon": "\ue22f ", "charged_icon": "\ue22f ",
"charging_icon": "\ue234 ", "charging_icon": "\ue234 ",
"discharging_icon": "\ue231 ", "discharging_icon": "\ue231 "
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 "
}, },
"style": "powerline", "style": "powerline",
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 ",
"type": "battery" "type": "battery"
}, },
{ {
@ -218,10 +212,8 @@
"foreground": "#111111", "foreground": "#111111",
"invert_powerline": true, "invert_powerline": true,
"leading_diamond": "\ue0b2", "leading_diamond": "\ue0b2",
"properties": {
"template": " {{ .CurrentDate | date .Format }} "
},
"style": "diamond", "style": "diamond",
"template": " {{ .CurrentDate | date .Format }} ",
"trailing_diamond": "\ue0b4", "trailing_diamond": "\ue0b4",
"type": "time" "type": "time"
} }
@ -231,5 +223,5 @@
], ],
"console_title_template": "{{ .Shell }} in {{ .Folder }}", "console_title_template": "{{ .Shell }} in {{ .Folder }}",
"final_space": true, "final_space": true,
"version": 1 "version": 2
} }

View file

@ -7,94 +7,75 @@
"segments": [ "segments": [
{ {
"foreground": "#ffbebc", "foreground": "#ffbebc",
"leading_diamond": "<#ff70a6>  </>", "leading_diamond": "<#ff70a6> \ue200 </>",
"powerline_symbol": "",
"properties": { "properties": {
"display_host": true, "display_host": true
"template": "{{ .UserName }} <#ffffff>on</>"
}, },
"style": "diamond", "style": "diamond",
"trailing_diamond": "", "template": "{{ .UserName }} <#ffffff>on</>",
"type": "session" "type": "session"
}, },
{ {
"foreground": "#bc93ff", "foreground": "#bc93ff",
"leading_diamond": "",
"properties": { "properties": {
"template": " {{ .CurrentDate | date .Format }} ",
"time_format": "Monday <#ffffff>at</> 3:04 PM" "time_format": "Monday <#ffffff>at</> 3:04 PM"
}, },
"style": "diamond", "style": "diamond",
"trailing_diamond": "", "template": " {{ .CurrentDate | date .Format }} ",
"type": "time" "type": "time"
}, },
{ {
"foreground": "#ee79d1", "foreground": "#ee79d1",
"leading_diamond": "",
"properties": { "properties": {
"branch_icon": "\ue725 ", "branch_icon": "\ue725 ",
"fetch_stash_count": true, "fetch_stash_count": true,
"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 }} \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": "diamond", "style": "diamond",
"trailing_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 }} ",
"type": "git" "type": "git"
} }
], ],
"type": "prompt" "type": "prompt"
}, },
{ {
"alignment": "right", "alignment": "right",
"newline": false,
"segments": [ "segments": [
{ {
"foreground": "#a9ffb4", "foreground": "#a9ffb4",
"properties": {
"template": ""
},
"style": "plain", "style": "plain",
"type": "text" "type": "text"
}, },
{ {
"foreground": "#a9ffb4", "foreground": "#a9ffb4",
"leading_diamond": "",
"properties": { "properties": {
"style": "dallas", "style": "dallas",
"template": " {{ .FormattedMs }}s <#ffffff></>",
"threshold": 0 "threshold": 0
}, },
"style": "diamond", "style": "diamond",
"trailing_diamond": "", "template": " {{ .FormattedMs }}s <#ffffff>\ue601</>",
"type": "executiontime" "type": "executiontime"
}, },
{ {
"properties": { "properties": {
"root_icon": "\uf292 ", "root_icon": "\uf292 "
"template": " \uf0e7 "
}, },
"style": "diamond", "style": "diamond",
"template": " \uf0e7 ",
"type": "root" "type": "root"
}, },
{ {
"foreground": "#94ffa2", "foreground": "#94ffa2",
"leading_diamond": "",
"properties": {
"template": " <#ffffff>CPU:</> {{ round .PhysicalPercentUsed .Precision }}% "
},
"style": "diamond", "style": "diamond",
"template": " <#ffffff>CPU:</> {{ round .PhysicalPercentUsed .Precision }}% ",
"type": "sysinfo" "type": "sysinfo"
}, },
{ {
"foreground": "#81ff91", "foreground": "#81ff91",
"properties": {
"template": "<#ffffff></> <#ffffff>RAM:</> {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1000000000.0) }}GB "
},
"style": "diamond", "style": "diamond",
"trailing_diamond": "", "template": "<#ffffff>\uf6dc</> <#ffffff>RAM:</> {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1000000000.0) }}GB ",
"type": "sysinfo" "type": "sysinfo"
} }
], ],
@ -106,34 +87,34 @@
"segments": [ "segments": [
{ {
"foreground": "#ffafd2", "foreground": "#ffafd2",
"leading_diamond": "<#00c7fc> </><#ffafd2>{</>", "leading_diamond": "<#00c7fc> \ue285 </><#ffafd2>{</>",
"properties": { "properties": {
"folder_icon": "", "folder_icon": "\uf07b",
"folder_separator_icon": "", "folder_separator_icon": "\uf9e0",
"home_icon": "home", "home_icon": "home",
"style": "agnoster_full", "style": "agnoster_full"
"template": " \ue5ff {{ .Path }} "
}, },
"style": "diamond", "style": "diamond",
"template": " \ue5ff {{ .Path }} ",
"trailing_diamond": "<#ffafd2>}</>", "trailing_diamond": "<#ffafd2>}</>",
"type": "path" "type": "path"
}, },
{ {
"foreground": "#A9FFB4", "foreground": "#A9FFB4",
"foreground_templates": ["{{ if gt .Code 0 }}#ef5350{{ end }}"], "foreground_templates": [
"{{ if gt .Code 0 }}#ef5350{{ end }}"
],
"properties": { "properties": {
"always_enabled": true, "always_enabled": true
"template": "  "
}, },
"style": "plain", "style": "plain",
"template": " \ue286 ",
"type": "exit" "type": "exit"
} }
], ],
"type": "prompt" "type": "prompt"
} }
], ],
"console_title": true,
"console_title_style": "template",
"console_title_template": "{{ .Folder }}", "console_title_template": "{{ .Folder }}",
"osc99": true, "osc99": true,
"transient_prompt": { "transient_prompt": {
@ -141,5 +122,5 @@
"foreground": "#FEF5ED", "foreground": "#FEF5ED",
"template": "\ue285 " "template": "\ue285 "
}, },
"version": 1 "version": 2
} }

View file

@ -8,10 +8,8 @@
"background": "#6272a4", "background": "#6272a4",
"foreground": "#ffffff", "foreground": "#ffffff",
"leading_diamond": "\ue0b6", "leading_diamond": "\ue0b6",
"properties": {
"template": "{{ .UserName }} "
},
"style": "diamond", "style": "diamond",
"template": "{{ .UserName }} ",
"type": "session" "type": "session"
}, },
{ {
@ -19,10 +17,10 @@
"foreground": "#ffffff", "foreground": "#ffffff",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": { "properties": {
"style": "folder", "style": "folder"
"template": " {{ .Path }} "
}, },
"style": "powerline", "style": "powerline",
"template": " {{ .Path }} ",
"type": "path" "type": "path"
}, },
{ {
@ -33,30 +31,28 @@
"branch_icon": "", "branch_icon": "",
"fetch_stash_count": true, "fetch_stash_count": true,
"fetch_status": false, "fetch_status": false,
"fetch_upstream_icon": true, "fetch_upstream_icon": true
"template": " \u279c ({{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }}) "
}, },
"style": "powerline", "style": "powerline",
"template": " \u279c ({{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }}) ",
"type": "git" "type": "git"
}, },
{ {
"background": "#8be9fd", "background": "#8be9fd",
"foreground": "#ffffff", "foreground": "#ffffff",
"powerline_symbol": "\ue0b0", "powerline_symbol": "\ue0b0",
"properties": {
"template": " \ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} "
},
"style": "powerline", "style": "powerline",
"template": " \ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
"type": "node" "type": "node"
}, },
{ {
"background": "#ff79c6", "background": "#ff79c6",
"foreground": "#ffffff", "foreground": "#ffffff",
"properties": { "properties": {
"template": " \u2665 {{ .CurrentDate | date .Format }} ",
"time_format": "15:04" "time_format": "15:04"
}, },
"style": "diamond", "style": "diamond",
"template": " \u2665 {{ .CurrentDate | date .Format }} ",
"trailing_diamond": "\ue0b0", "trailing_diamond": "\ue0b0",
"type": "time" "type": "time"
} }
@ -65,5 +61,5 @@
} }
], ],
"final_space": true, "final_space": true,
"version": 1 "version": 2
} }