Skip to content

Instantly share code, notes, and snippets.

@lkurzyniec
Last active August 22, 2024 12:54
Show Gist options
  • Save lkurzyniec/8b6c9d2eba5f59993b606519f836162e to your computer and use it in GitHub Desktop.
Save lkurzyniec/8b6c9d2eba5f59993b606519f836162e to your computer and use it in GitHub Desktop.
Oh My Posh theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"console_title_template": "{{ .Shell }} in {{ .Folder }}",
"auto_upgrade": true,
"disable_notice": true,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "root",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#100e23",
"background": "#ffe9aa",
"template": "\uf0e7"
},
{
"type": "os",
"style": "plain",
"foreground": "#ffffff",
"background": "transparent",
"template": "{{ if .WSL }}WSL {{ end }}{{.Icon}} ",
"properties": {
"display_distro_name": true
}
},
{
"type": "session",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#100e23",
"background": "#ffffff",
"template": "{{ if .SSHSession }}\udb80\udf18 {{ end }}{{ .UserName }}"
},
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#100e23",
"background": "#91ddff",
"template": "{{ .Path }}",
"properties": {
"folder_icon": "\uf115",
"folder_separator_icon": " \ue0b1 ",
"max_depth": 3,
"style": "agnoster_short"
}
},
{
"type": "node",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#86BBD8",
"template": "\ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}"
},
{
"type": "dotnet",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#6CA35E",
"template": "\ue77f {{ .Full }}"
},
{
"type": "time",
"style": "diamond",
"foreground": "#ffffff",
"background": "#49404f",
"leading_diamond": "<transparent,#49404f>\ue0b0</>",
"template": "{{ .CurrentDate | date .Format }}\ue621",
"properties": {
"time_format": "15:04:05"
}
},
{
"type": "executiontime",
"style": "diamond",
"foreground": "#ffffff",
"background": "#49404f",
"trailing_diamond": "\ue0b0",
"template": "({{ .FormattedMs }}s)",
"properties": {
"style": "dallas",
"threshold": 0
}
},
{
"type": "exit",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#910000",
"template": "<transparent>\uf12a</> {{ .Meaning }}"
}
]
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"type": "git",
"style": "diamond",
"foreground": "#011627",
"background": "#17D7A0",
"leading_diamond": "\ue0b2",
"trailing_diamond": "\ue0b0",
"template": "{{ .UpstreamIcon }}{{ .HEAD | replace \"feature\" \"(f)\" }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \udb80\udd93 {{ .StashCount }}{{ end }}",
"properties": {
"branch_icon": "\ue725 ",
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"fetch_worktree_count": true
}
},
{
"type": "terraform",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#000000",
"background": "#ebcc34",
"template": "{{ .WorkspaceName }}{{ if .Version }} {{ .Version }}{{ end }}",
"properties": {
"fetch_version": false
}
},
{
"type": "az",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#000000",
"background": "#9ec3f0",
"template": "\ufd03 {{ .Name | replace \"subscription\" \"sub\" | replace \"Subscription\" \"Sub\" }}({{ if .EnvironmentName | contains \"AzureCloud\" }}{{ \"def\" }}{{ else }}{{ .EnvironmentName }}{{ end }},{{ .User.Type | initials }})"
},
{
"type": "aws",
"tips": [
"aws",
"terraform",
"tf"
],
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background_templates": [
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
],
"template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
"properties": {
"display_default": false
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "text",
"style": "plain",
"foreground": "#007ACC",
"template": "❯ "
}
],
"newline": true
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment