Skip to content

Instantly share code, notes, and snippets.

@birdiewd
Created November 11, 2021 23:15
Show Gist options
  • Save birdiewd/ac20c3b2cd4701302435ff4375daec22 to your computer and use it in GitHub Desktop.
Save birdiewd/ac20c3b2cd4701302435ff4375daec22 to your computer and use it in GitHub Desktop.
{
"blocks": [
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "git",
"style": "plain",
"foreground": "blue",
"properties": {
// "prefix": "",
"fetch_upstream_icon": true,
"template": "{{ .HEAD }}"
}
}
]
},
{
"type": "prompt",
"alignment": "right",
// "vertical_offset": -1,
"segments": [
{
"type": "time",
"style": "plain",
"foreground": "yellow",
"properties": {
"time_format": "3:04:05 PM",
"postfix": ""
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "path",
"style": "plain",
// "powerline_symbol": "\uE0B0",
"foreground": "magenta",
"background": "transparent",
"properties": {
// "prefix": "",
"style": "folder"
}
},
{
"type": "git",
"style": "diamond",
// "powerline_symbol": "\uE0B0",
"foreground": "white",
"background": "blue",
"leading_diamond": "\uE0C7",
"trailing_diamond": "\uE0C6",
// "foreground_templates": [
// "{{ if or (.Working.Changed) (.Staging.Changed) }}red{{ end }}",
// "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC80{{ end }}",
// "{{ if gt .Ahead 0 }}blue{{ end }}",
// "{{ if gt .Behind 0 }}white{{ end }}"
// ],
// "background_templates": [
// "{{ if or (.Working.Changed) (.Staging.Changed) }}red{{ end }}",
// "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC80{{ end }}",
// "{{ if gt .Ahead 0 }}blue{{ end }}",
// "{{ if gt .Behind 0 }}red{{ end }}"
// ],
"properties": {
"fetch_status": true,
"fetch_stash_count": true,
"fetch_upstream_icon": true,
"template": "{{ .UpstreamIcon }}{{ .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": "text",
"style": "plain",
"properties": {
"text": " ",
"prefix": "",
"postfix": ""
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment