Skip to content

Instantly share code, notes, and snippets.

@kurtanr
Last active April 21, 2025 13:51
Show Gist options
  • Select an option

  • Save kurtanr/c80c7271c2b242908f8ba9d2fae9bd38 to your computer and use it in GitHub Desktop.

Select an option

Save kurtanr/c80c7271c2b242908f8ba9d2fae9bd38 to your computer and use it in GitHub Desktop.
Custom theme for 'Oh My Posh'
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"palette": {
"black": "#262B44",
"blue": "#4B95E9",
"green": "#59C9A5",
"orange": "#F07623",
"red": "#D81E5B",
"white": "#E0DEF4",
"yellow": "#F3AE35"
},
"secondary_prompt": {
"template": "<p:yellow,transparent>\ue0b6</><,p:yellow> > </><p:yellow,transparent>\ue0b0</> ",
"foreground": "p:black",
"background": "transparent"
},
"transient_prompt": {
"template": "<p:yellow,transparent>\ue0b6</><,p:yellow> {{ .Folder }} </><p:yellow,transparent>\ue0b0</> ",
"foreground": "p:black",
"background": "transparent"
},
"console_title_template": "{{ .Folder }}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"properties": {
"root_icon": "\uf0ad"
},
"trailing_diamond": " ",
"foreground": "p:red",
"background": "p:orange",
"type": "root",
"style": "diamond"
},
{
"properties": {
"precision": 2
},
"trailing_diamond": "\ue0b0",
"template": " \uf85a {{ round .PhysicalPercentUsed .Precision }}% ",
"foreground": "p:white",
"background": "p:blue",
"type": "sysinfo",
"style": "diamond"
},
{
"properties": {
"home_icon": "~",
"style": "folder"
},
"template": " \udb80\ude4b {{ path .Path .Location }} ",
"foreground": "p:black",
"powerline_symbol": "\ue0b0",
"background": "p:orange",
"type": "path",
"style": "powerline"
},
{
"properties": {
"branch_max_length": 25,
"fetch_status": true,
"fetch_upstream_icon": true
},
"leading_diamond": "<transparent,background>\ue0b0</>",
"trailing_diamond": "\ue0b0",
"template": " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
"foreground": "p:black",
"background": "p:green",
"type": "git",
"style": "diamond",
"foreground_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}",
"{{ if gt .Ahead 0 }}p:white{{ end }}"
],
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}",
"{{ if gt .Ahead 0 }}#49416D{{ end }}",
"{{ if gt .Behind 0 }}#7A306C{{ end }}"
]
},
{
"properties": {
"style": "austin",
"threshold": 50
},
"leading_diamond": "<transparent,background>\ue0b0</>",
"trailing_diamond": "\ue0b0",
"template": " {{ .FormattedMs }}",
"foreground": "#ffffff",
"background": "#8800dd",
"type": "executiontime",
"style": "diamond"
},
{
"properties": {
"always_enabled": true
},
"leading_diamond": "<transparent,background>\ue0b0</>",
"trailing_diamond": "\ue0b4",
"template": " {{ if gt .Code 0 }}\uf00d{{ else }}\uf00c{{ end }} ",
"foreground": "p:white",
"background": "p:blue",
"type": "exit",
"style": "diamond",
"background_templates": [
"{{ if gt .Code 0 }}p:red{{ end }}"
]
}
]
},
{
"type": "rprompt",
"segments": [
{
"template": " {{ .CurrentDate | date \"15:04:05\" }}",
"foreground": "p:black",
"powerline_symbol": "\ue0b0",
"background": "p:yellow",
"type": "time",
"style": "powerline"
},
{
"type": "command",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "p:orange",
"properties": {
"shell": "pwsh",
"command": "write-output $Env:wforecast"
}
}
]
}
],
"version": 3,
"final_space": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment