Skip to content

Instantly share code, notes, and snippets.

@cobaohieu
Last active September 8, 2023 13:28
Show Gist options
  • Save cobaohieu/a40db9a9bc0f6d0157923cd781c00dc0 to your computer and use it in GitHub Desktop.
Save cobaohieu/a40db9a9bc0f6d0157923cd781c00dc0 to your computer and use it in GitHub Desktop.
ohmyposh theme 2023
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"final_space": true,
"console_title_template": "{{ .Shell }} in {{ .Folder }}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "os",
"style": "diamond",
"foreground": "#FFFFFF",
"background": "#44caff",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b0",
"template": "{{ .Icon }} "
},
{
"background": "#de2121",
"foreground": "#fff",
"leading_diamond": "<transparent,#de2121>\ue0b0</>",
"style": "diamond",
"template": " \ueb06 \u276f {{ .UserName }} ",
"trailing_diamond": "\ue0b0",
"type": "path"
},
{
"background": "#280C2E",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#7621DE{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#7621DE{{ end }}",
"{{ if gt .Ahead 0 }}#7621DE{{ end }}",
"{{ if gt .Behind 0 }}#7621DE{{ end }}"
],
"foreground": "#FFFFFF",
"powerline_symbol": "\ue0b0",
"properties": {
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true
},
"style": "powerline",
"template": " {{ .UpstreamIcon }}{{ .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": "git"
},
{
"type": "path",
"style": "diamond",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#26BDBB",
"leading_diamond": "<transparent,#26BDBB>\ue0b0</>",
"trailing_diamond": "\ue0b0",
"template": " \ue5ff {{ .Path }} ",
"properties": {
"style": "folder"
}
},
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#193549",
"background": "#fffb38",
"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": "path",
"style": "diamond",
"powerline_symbol": "\ue0b0",
"foreground": "#ffc600",
"background": "#18354c",
"leading_diamond": "<transparent,#18354c>\ue0b0</>",
"trailing_diamond": "<transparent,#18354c></>\ue0b0",
"template": " \uf0e7 ",
"properties": {
"display_mode": "files",
"fetch_version": false
}
},
{
"type": "shell",
"style": "diamond",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#4E44FF",
"background_templates": [
"{{ if gt .Code 0 }}#f1184c{{ end }}"
],
"leading_diamond": "<transparent,#4E44FF>\ue0b0</>",
"trailing_diamond": "\ue0b0",
"template": " {{ if gt .Code 0 }}\uf00d{{ else }}\uf42e{{ end }} ",
"properties": {
"always_enabled": true
}
},
{
"foreground": "#FFD54F",
"style": "plain",
"template": " {{if .Root}}${{else}}#{{end}}",
"type": "text"
}
]
},
{
"type": "rprompt",
"segments": [
{
"background": "#0080ff",
"foreground": "#ffffff",
"style": "plain",
"template": "<#0080ff,transparent>\ue0b6</>\uf489 {{ .Name }} <transparent,#0080ff>\ue0b2</>",
"type": "shell"
},
{
"type": "battery",
"background": "#f36943",
"background_templates": [
"{{if eq \"Charging\" .State.String}}#40c4ff{{end}}",
"{{if eq \"Discharging\" .State.String}}#ff5722{{end}}",
"{{if eq \"Full\" .State.String}}#4caf50{{end}}"
],
"foreground": "#ffffff",
"invert_powerline": true,
"powerline_symbol": "\ue0b2",
"properties": {
"charged_icon": "\ue22f ",
"charging_icon": "\ue234 ",
"discharging_icon": "\ue231 "
},
"style": "diamond",
"leading_diamond": "\ue0b2",
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 </><#000>\ue0b2</>"
},
{
"type": "sysinfo",
"style": "diamond",
"foreground": "#ffc107",
"background": "#18354c",
"leading_diamond": "\ue0b2",
"template": " \ue266 CPU: {{ round .PhysicalPercentUsed .Precision }}% | "
},
{
"type": "sysinfo",
"style": "diamond",
"foreground": "#ffc107",
"background": "#18354c",
"template": "RAM: {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1048786176.0) }}GB \ue266 ",
"trailing_diamond": "<transparent,#18354c>\ue0b2</>"
},
{
"type": "time",
"style": "diamond",
"background": "#f14e32",
"foreground": "#ffffff",
"invert_powerline": true,
"leading_diamond": "\ue0b2",
"powerline_symbol": "\ue0b2",
"properties": {
"time_format": "Monday <#ffffff>at</> 3:04 PM"
},
"template": "<#2e9599, transparent> </>\ue641 {{ .CurrentDate | date .Format }} <#000>\ue0b2</>"
},
{
"type": "executiontime",
"style": "diamond",
"background": "#83769c",
"foreground": "#ffffff",
"properties": {
"always_enabled": true
},
"template": "<#83769c, transparent></> \uf252 {{ .FormattedMs }}",
"leading_diamond": "\ue0b2",
"trailing_diamond": "\ue0b4"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment