Skip to content

Instantly share code, notes, and snippets.

@dcarles
Created June 7, 2023 17:15
Show Gist options
  • Save dcarles/18bb30cd0e877ae7eede4d77078bda4c to your computer and use it in GitHub Desktop.
Save dcarles/18bb30cd0e877ae7eede4d77078bda4c to your computer and use it in GitHub Desktop.
Oh My Posh config file
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"final_space": true,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "diamond",
"foreground": "#ffffff",
"background": "#000080",
"leading_diamond": "",
"trailing_diamond": "",
"template": "{{ if .SSHSession }} {{ end }}{{ .UserName }}"
},
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#FF0000",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b0",
"template": " \ue5ff {{ .Path }} ",
"properties": {
"style": "folder"
}
},
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#193549",
"background": "#FFD700",
"template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
"properties": {
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true
}
},
{
"type": "dotnet",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#6CA35E",
"template": " \ue70c {{ if .Unsupported }}\uf071{{ else }}{{ .Full }}{{ end }} ",
"properties": {
"fetch_version": true
}
},
{
"type": "root",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#ffff66",
"template": " \uf0e7 "
},
{
"type": "exit",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#2e9599",
"background_templates": [
"{{ if gt .Code 0 }}#f1184c{{ end }}"
],
"trailing_diamond": "\ue0b4",
"template": " \ue23a{{ if gt .Code 0 }}\uf00d{{ else }}\uf42e{{ end }} ",
"properties": {
"always_enabled": true
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment