Skip to content

Instantly share code, notes, and snippets.

@schindld
Last active October 20, 2023 17:09
Show Gist options
  • Save schindld/50218214bb08c9ee13bd129712f1a1ee to your computer and use it in GitHub Desktop.
Save schindld/50218214bb08c9ee13bd129712f1a1ee to your computer and use it in GitHub Desktop.
Customized theme for oh-my-posh
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title_template": "{{if .Root}} \u26a1 {{end}}{{.UserName}} \u2794 📁{{.Folder}}",
"final_space": true,
"patch_pwsh_bleed": true,
"version": 2,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "os",
"background": "#61AFEF",
"foreground": "#000000",
"leading_diamond": "\ue0b6",
"style": "diamond",
"template": "{{ .Icon }} ",
"trailing_diamond": "\ue0b0"
},
{
"type": "root",
"background": "#DE2121",
"foreground": "#000000",
"leading_diamond": "<transparent,#DE2121>\ue0b0</>",
"style": "diamond",
"template": " \uf0e7 ",
"trailing_diamond": "\ue0b0"
},
{
"type": "path",
"background": "#61AFEF",
"foreground": "#000000",
"powerline_symbol": "\ue0b0",
"properties": {
"folder_icon": "\uf115",
"folder_separator_icon": " \ue0b1 ",
"home_icon": "\ueb06",
"max_depth": 2,
"style": "full"
},
"style": "powerline",
"template": " {{ .Path }} "
},
{
"type": "git",
"background": "#95ffa4",
"foreground": "#193549",
"powerline_symbol": "\ue0b0",
"properties": {
"branch_icon": "\ue725",
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true
},
"style": "powerline",
"template": " {{ .HEAD }}{{ 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 }} \ueb4b {{ .StashCount }}{{ end }} "
}
]
},
{
"type": "rprompt",
"alignment": "right",
"segments": [
{
"type": "time",
"background": "#61AFEF",
"background_templates": [
"{{ if .Error }}#e91e63{{ end }}"
],
"foreground": "#000000",
"leading_diamond": "\ue0b6",
"style": "diamond",
"template": "\ue641 {{ .CurrentDate | date .Format }}",
"properties": {
"time_format": "15:04"
}
},
{
"type": "status",
"style": "diamond",
"foreground": "#00897b",
"background": "#61AFEF",
"foreground_templates": [
"{{ if .Error }}#e91e63{{ end }}"
],
"trailing_diamond": "\ue0b4",
"template": " {{ if .Error }}\ue654{{ else }}\uf00c{{ end }} ",
"properties": {
"always_enabled": true
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment