mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
fb6f8e63df
1. Adjust the space between icon and text in "session" segment. 2. Add the background color of upstream gone in "git" segment. 3. Add upstream hyperlink and adjust the space between icon and text in "git" segment.
133 lines
4.2 KiB
JSON
133 lines
4.2 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"alignment": "left",
|
|
"segments": [
|
|
{
|
|
"foreground": "#ffce7b",
|
|
"properties": {
|
|
"template": "\u250c "
|
|
},
|
|
"style": "plain",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"background": "#ffce7b",
|
|
"foreground": "#1d1626",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"template": " \uf26c {{ if .SSHSession }}\uf817 {{ end }}{{ .UserName }}@{{ .HostName }} "
|
|
},
|
|
"style": "powerline",
|
|
"type": "session"
|
|
},
|
|
{
|
|
"background": "#C678DD",
|
|
"foreground": "#fffef9",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ",
|
|
"windows": "\uf17a"
|
|
},
|
|
"style": "powerline",
|
|
"type": "os"
|
|
},
|
|
{
|
|
"background": "#C678DD",
|
|
"foreground": "#fffef9",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"style": "full",
|
|
"template": "{{ path .Path .Location }} "
|
|
},
|
|
"style": "powerline",
|
|
"type": "path"
|
|
},
|
|
{
|
|
"background": "#fffffb",
|
|
"background_templates": [
|
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb95{{ end }}",
|
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#fcaf17{{ end }}",
|
|
"{{ if gt .Ahead 0 }}#95ffa4{{ end }}",
|
|
"{{ if gt .Behind 0 }}#f7acbc{{ end }}",
|
|
"{{ if .UpstreamGone }}#d1c7b7{{ end }}"
|
|
],
|
|
"foreground": "#100e23",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"azure_devops_icon": "\ufd03 ",
|
|
"bitbucket_icon": "\uf171 ",
|
|
"branch_gone_icon": "\uf68e ",
|
|
"branch_icon": "\ue0a0 ",
|
|
"branch_identical_icon": "\uf690 ",
|
|
"commit_icon": "\uf417 ",
|
|
"fetch_stash_count": true,
|
|
"fetch_status": true,
|
|
"fetch_upstream_icon": true,
|
|
"fetch_worktree_count": true,
|
|
"git_icon": "\uf1d3 ",
|
|
"github_icon": "\uf408 ",
|
|
"gitlab_icon": "\uf296 ",
|
|
"tag_icon": "\uf412 ",
|
|
"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 }} "
|
|
},
|
|
"style": "powerline",
|
|
"type": "git"
|
|
},
|
|
{
|
|
"background": "#33a3dc",
|
|
"foreground": "#fffef9",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"always_enabled": true,
|
|
"template": " \uf064 {{ .FormattedMs }} "
|
|
},
|
|
"style": "powerline",
|
|
"type": "executiontime"
|
|
},
|
|
{
|
|
"background": "#ed1941",
|
|
"foreground": "#fffef9",
|
|
"powerline_symbol": "\ue0b0",
|
|
"properties": {
|
|
"template": " \uf12a >>{{ .Meaning }} "
|
|
},
|
|
"style": "powerline",
|
|
"type": "exit"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#ffce7b",
|
|
"properties": {
|
|
"template": "\u2514"
|
|
},
|
|
"style": "plain",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"foreground": "#ffffff",
|
|
"properties": {
|
|
"template": " $"
|
|
},
|
|
"style": "plain",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
}
|
|
],
|
|
"console_title": true,
|
|
"console_title_style": "template",
|
|
"console_title_template": "{{if .Root}}\u26a1 {{end}}{{.Folder}}",
|
|
"final_space": true,
|
|
"osc99": true,
|
|
"version": 1
|
|
}
|