Skip to content

Instantly share code, notes, and snippets.

@kenhia
Created March 19, 2024 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenhia/61f88928b1383a85b2b14e0d608a1b00 to your computer and use it in GitHub Desktop.
Save kenhia/61f88928b1383a85b2b14e0d608a1b00 to your computer and use it in GitHub Desktop.
Ken's default oh-my-posh theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"final_space": true,
"console_title_template": "{{ .Host }} {{ .Folder }}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#707070",
"background": "#252525",
"template": " \ue5ff {{ .Path }} ",
"properties": {
"folder_separator_icon": "/",
"style": "full"
}
},
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#193549",
"background": "#adafa6",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
"{{ if gt .Ahead 0 }}#f17c37{{ end }}",
"{{ if gt .Behind 0 }}#89d1dc{{ end }}"
],
"template": " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}}\uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ",
"properties": {
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true
}
},
{
"type": "executiontime",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#8800dd",
"template": "<#fefefe>\ufbab</>{{ .FormattedMs }} ",
"properties": {
"style": "austin",
"threshold": 500
}
},
{
"type": "exit",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#242424",
"background": "#185f15",
"background_templates": [
"{{ if gt .Code 0 }}#f1184c{{ end }}"
],
"template": " \ufc8d{{ if gt .Code 0 }}\uf00d {{ .Meaning }}{{ else }}\uf42e{{ end }} ",
"properties": {
"always_enabled": true,
"display_exit_code": true
}
},
{
"type": "python",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#100e23",
"background": "#906cff",
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} ",
"properties": {
"display_mode": "environment"
}
}
],
"vertical_offset": 1
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
// Show lightning bolt if root
"type": "root",
"style": "plain",
"foreground": "#FFD700",
"template": " \uf0e7 ",
"properties": {
"root_icon": "\u26a1"
}
},
{
"type": "text",
"style": "plain",
"foreground": "#f1184c",
"template": "λ "
}
],
"newline": true
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment