Skip to content

Instantly share code, notes, and snippets.

@Fammy
Last active March 2, 2023 15:55
Show Gist options
  • Save Fammy/cfc685f7cbd3dabfb0d41ca7729ea530 to your computer and use it in GitHub Desktop.
Save Fammy/cfc685f7cbd3dabfb0d41ca7729ea530 to your computer and use it in GitHub Desktop.
My Oh My Posh theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
// Root indicator
{
"type": "root",
"style": "diamond",
"foreground": "p:root-fg",
"background": "p:root-bg",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b4 ",
"template": "\uf0e7"
},
// OS icon
{
"type": "os",
"style": "diamond",
"foreground_templates": [
"{{ if eq .OS \"darwin\" }}p:macos-fg{{ end }}",
"{{ if eq .OS \"windows\" }}p:win-fg{{ end }}",
"{{ if eq .OS \"ubuntu\" }}p:ubuntu-fg{{ end }}",
"{{ if eq .OS \"raspbian\" }}p:raspi-fg{{ end }}",
"{{ if eq .OS \"arch\" }}p:arch-fg{{ end }}",
"p:path-fg"
],
"background_templates": [
"{{ if eq .OS \"darwin\" }}p:macos-bg{{ end }}",
"{{ if eq .OS \"windows\" }}p:win-bg{{ end }}",
"{{ if eq .OS \"ubuntu\" }}p:ubuntu-bg{{ end }}",
"{{ if eq .OS \"raspbian\" }}p:raspi-bg{{ end }}",
"{{ if eq .OS \"arch\" }}p:arch-bg{{ end }}",
"p:path-bg"
],
"leading_diamond": "\ue0b6",
"template": "{{ .Icon }} "
},
// Battery
{
"type": "battery",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "p:battery-bg",
"background": "p:battery-fg",
"templates": [
"{{ if eq .State.String \"Full\" }} \udb80\udc84 {{ .Percentage }}% {{ end }}",
"{{ if and (eq .State.String \"Discharging\") (gt .Percentage 95) }} \udb80\udc79 {{ .Percentage }}% {{ end }}",
"{{ if and (eq .State.String \"Discharging\") (gt .Percentage 85) }} \udb80\udc82 {{ .Percentage }}% {{ end }}",
"{{ if and (eq .State.String \"Discharging\") (gt .Percentage 75) }} \udb80\udc81 {{ .Percentage }}% {{ end }}",
"{{ if and (eq .State.String \"Discharging\") (gt .Percentage 65) }} \udb80\udc80 {{ .Percentage }}% {{ end }}",
"{{ if and (eq .State.String \"Discharging\") (gt .Percentage 55) }} \udb80\udc7f {{ .Percentage }}% {{ end }}",
"{{ if and (eq .State.String \"Discharging\") (gt .Percentage 45) }} \udb80\udc7e {{ .Percentage }}% {{ end }}",
"{{ if and (eq .State.String \"Discharging\") (gt .Percentage 35) }} \udb80\udc7d {{ .Percentage }}% {{ end }}",
"{{ if and (eq .State.String \"Discharging\") (gt .Percentage 25) }} \udb80\udc7c {{ .Percentage }}% {{ end }}",
"{{ if and (eq .State.String \"Discharging\") (gt .Percentage 15) }} \udb80\udc7b {{ .Percentage }}% {{ end }}",
"{{ if eq .State.String \"Discharging\" }} \udb80\udc7a {{ .Percentage }}% {{ end }}",
"{{ if gt .Percentage 95 }} \udb80\udc85 {{ .Percentage }}% {{ end }}",
"{{ if gt .Percentage 85 }} \udb80\udc8b {{ .Percentage }}% {{ end }}",
"{{ if gt .Percentage 75 }} \udb80\udc8a {{ .Percentage }}% {{ end }}",
"{{ if gt .Percentage 65 }} \udb82\udc9e {{ .Percentage }}% {{ end }}",
"{{ if gt .Percentage 55 }} \udb80\udc89 {{ .Percentage }}% {{ end }}",
"{{ if gt .Percentage 45 }} \udb82\udc9d {{ .Percentage }}% {{ end }}",
"{{ if gt .Percentage 35 }} \udb82\udc9d {{ .Percentage }}% {{ end }}",
"{{ if gt .Percentage 25 }} \udb80\udc87 {{ .Percentage }}% {{ end }}",
"{{ if gt .Percentage 15 }} \udb80\udc86 {{ .Percentage }}% {{ end }}",
" \udb82\udc9c {{ .Percentage }}% "
],
"templates_logic": "first_match"
},
// Remote session
{
"type": "session",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "p:session-bg",
"background": "p:session-fg",
"template": "{{ if .SSHSession }} \udb80\udf18 {{ end }}"
},
// Special paths: Home, git, root
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground_templates": [
"{{ if .Segments.Git }}p:git-fg{{ end }}",
"p:path-special-fg"
],
"background_templates": [
"{{ if .Segments.Git }}p:git-bg{{ end }}",
"p:path-special-bg"
],
"templates": [
"{{ if .Segments.Git }} \uf1d2 {{ end }}",
"{{ if eq \"/\" (trunc 1 .Path) }} / {{ end }}",
"{{ if eq \"C:\" (trunc 2 .Path) }} c {{ end }}",
"{{ if eq \"D:\" (trunc 2 .Path) }} d {{ end }}",
"{{ if eq \"E:\" (trunc 2 .Path) }} e {{ end }}",
"{{ if eq \"F:\" (trunc 2 .Path) }} f {{ end }}",
"{{ if eq \"G:\" (trunc 2 .Path) }} g {{ end }}",
"{{ if eq \"~\" (trunc 1 .Path) }} \udb80\udedc {{ end }}"
],
"templates_logic": "first_match"
},
// Current path
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "p:path-fg",
"background": "p:path-bg",
"templates": [
"{{ $segment := .Segments.Git }}{{ $folder := replace \"/\" \" \ue0b1 \" (replace \"\\\\\" \" \ue0b1 \" (trimPrefix \"\\\\\" (trimPrefix \"/\" (trimPrefix $segment.Dir .PWD)))) }}{{ if $segment.Dir }} <i>{{ $segment.RepoName }}</i>{{ if $folder }} \ue0b1 {{ $folder }}{{ end }} {{ end }}",
"{{ if contains \"~\" .Path }}{{ trimPrefix \"~ \ue0b1\" .Path }} {{ end }}",
"{{ if or (hasPrefix \"C:\" .Path) (hasPrefix \"D:\" .Path) (hasPrefix \"E:\" .Path) (hasPrefix \"F:\" .Path) (hasPrefix \"G:\" .Path) }}{{ substr 6 (.Path | len) .Path }} {{ end }}",
" {{ .Path }} "
],
"templates_logic": "first_match",
"properties": {
"exclude_folders": [
"~",
"/",
"c:\\\\",
"d:\\\\",
"e:\\\\",
"f:\\\\",
"g:\\\\"
],
"folder_icon": "\uf115",
"folder_separator_icon": " \ue0b1 ",
"mixed_threshold": 8,
"style": "mixed"
}
},
// Git status
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "p:git-fg",
"background": "p:git-bg",
"templates": [
" {{ .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 }} "
],
"templates_logic": "join",
"properties": {
"fetch_status": true
}
}
]
}
],
"palettes": {
//"template": "{{ if mod (now.Second | int) 2 }}paradox{{ else }}highway{{ end }}", // Change every second
//"template": "{{ if mod (now.Hour | int) 2 }}paradox{{ else }}highway{{ end }}", // Change every hour
//"template": "{{ if gt (now.Hour | int) 17 }}paradox{{ else }}highway{{ end }}", // Change after 5pm
//"template": "{{ if eq (now.Weekday | toString) \"Friday\" }}paradox{{ else }}highway{{ end }}", // Special theme on Friday
//"template": "{{ if eq (mod (now.Minute | int) 5) 0 }}paradox{{ else if eq (mod (now.Minute | int) 5) 1 }}ciapre{{ else if eq (mod (now.Minute | int) 5) 2 }}dehydration{{ else if eq (mod (now.Minute | int) 5) 3 }}ciapre{{ else if eq (mod (now.Minute | int) 5) 4 }}gogh{{else}}highway{{ end }}", // Change every minute
"template": "{{ $factor := mod (now.Day | int) 6 }}{{ if eq $factor 0 }}paradox{{ else if eq $factor 1 }}highway{{ else if eq $factor 2 }}dehydration{{ else if eq $factor 3 }}ciapre{{ else if eq $factor 4 }}gogh{{else}}gotham{{ end }}", // Change every day
//"template": "gotham",
"list": {
"highway": {
"arch-bg": "#33aadd",
"arch-fg": "p:brightWhite",
"battery-bg": "p:cyan",
"battery-fg": "p:yellow",
"git-bg": "p:cyan",
"git-fg": "p:brightBlue",
"macos-bg": "#652bf2",
"macos-fg": "p:brightWhite",
"path-bg": "p:brightBlue",
"path-fg": "p:black",
"path-special-bg": "p:brightWhite",
"path-special-fg": "p:black",
"raspi-bg": "#cb2755",
"raspi-fg": "p:brightWhite",
"root-bg": "p:yellow",
"root-fg": "p:black",
"session-bg": "p:brightWhite",
"session-fg": "p:purple",
"ubuntu-bg": "#e95420",
"ubuntu-fg": "p:brightWhite",
"win-bg": "#0667b4",
"win-fg": "p:brightWhite",
"black": "#000000",
"red": "#d00e18",
"green": "#138034",
"yellow": "#ffcb3e",
"blue": "#006bb3",
"purple": "#6b2775",
"cyan": "#384564",
"white": "#ededed",
"brightBlack": "#5d504a",
"brightRed": "#f07e18",
"brightGreen": "#b1d130",
"brightYellow": "#fff120",
"brightBlue": "#4fc2fd",
"brightPurple": "#de0071",
"brightCyan": "#5d504a",
"brightWhite": "#ffffff",
"foreground": "#ededed",
"background": "#222225"
},
"paradox": {
"arch-bg": "#33aadd",
"arch-fg": "#ffffff",
"battery-bg": "#193549",
"battery-fg": "#ffeb3b",
"git-bg": "#95ffa4",
"git-fg": "#193549",
"macos-bg": "#652bf2",
"macos-fg": "#f5f5f7",
"path-bg": "#91ddff",
"path-fg": "#100e23",
"path-special-bg": "#ffffff",
"path-special-fg": "#100e23",
"raspi-bg": "#cb2755",
"raspi-fg": "#ffffff",
"root-bg": "#ffe9aa",
"root-fg": "#100e23",
"session-bg": "#ffffff",
"session-fg": "#c386f1",
"ubuntu-bg": "#e95420",
"ubuntu-fg": "#ffffff",
"win-bg": "#0667b4",
"win-fg": "#ffffff"
},
"ciapre": {
"arch-bg": "#33aadd",
"arch-fg": "p:brightWhite",
"battery-bg": "p:cyan",
"battery-fg": "p:yellow",
"git-bg": "p:brightCyan",
"git-fg": "p:brightBlue",
"macos-bg": "#652bf2",
"macos-fg": "p:brightWhite",
"path-bg": "p:brightBlue",
"path-fg": "p:black",
"path-special-bg": "p:brightWhite",
"path-special-fg": "p:black",
"raspi-bg": "#cb2755",
"raspi-fg": "p:brightWhite",
"root-bg": "p:yellow",
"root-fg": "p:black",
"session-bg": "p:brightWhite",
"session-fg": "p:purple",
"ubuntu-bg": "#e95420",
"ubuntu-fg": "p:brightWhite",
"win-bg": "#0667b4",
"win-fg": "p:brightWhite",
"black": "#181818",
"red": "#810009",
"green": "#48513b",
"yellow": "#cc8b3f",
"blue": "#576d8c",
"purple": "#724d7c",
"cyan": "#5c4f4b",
"white": "#aea47f",
"brightBlack": "#555555",
"brightRed": "#ac3835",
"brightGreen": "#a6a75d",
"brightYellow": "#dcdf7c",
"brightBlue": "#3097c6",
"brightPurple": "#d33061",
"brightCyan": "#f3dbb2",
"brightWhite": "#f4f4f4",
"foreground": "#aea47a",
"background": "#191c27"
},
"dehydration": {
"arch-bg": "#33aadd",
"arch-fg": "p:brightWhite",
"battery-bg": "p:cyan",
"battery-fg": "p:yellow",
"git-bg": "p:cyan",
"git-fg": "p:brightBlue",
"macos-bg": "#652bf2",
"macos-fg": "p:brightWhite",
"path-bg": "p:brightBlue",
"path-fg": "p:black",
"path-special-bg": "p:brightWhite",
"path-special-fg": "p:black",
"raspi-bg": "#cb2755",
"raspi-fg": "p:brightWhite",
"root-bg": "p:yellow",
"root-fg": "p:black",
"session-bg": "p:brightWhite",
"session-fg": "p:purple",
"ubuntu-bg": "#e95420",
"ubuntu-fg": "p:brightWhite",
"win-bg": "#0667b4",
"win-fg": "p:brightWhite",
"black": "#333333",
"red": "#ff5555",
"green": "#5fd38d",
"yellow": "#ff9955",
"blue": "#3771c8",
"purple": "#bc5fd3",
"cyan": "#5fd3bc",
"white": "#999999",
"brightBlack": "#666666",
"brightRed": "#ff8080",
"brightGreen": "#87deaa",
"brightYellow": "#ffb380",
"brightBlue": "#5f8dd3",
"brightPurple": "#cd87de",
"brightCyan": "#87decd",
"brightWhite": "#cccccc",
"foreground": "#cccccc",
"background": "#333333"
},
"gogh": {
"arch-bg": "#33aadd",
"arch-fg": "p:brightWhite",
"battery-bg": "p:cyan",
"battery-fg": "p:yellow",
"git-bg": "p:brightCyan",
"git-fg": "p:brightBlue",
"macos-bg": "#652bf2",
"macos-fg": "p:brightWhite",
"path-bg": "p:brightBlue",
"path-fg": "p:black",
"path-special-bg": "p:brightWhite",
"path-special-fg": "p:black",
"raspi-bg": "#cb2755",
"raspi-fg": "p:brightWhite",
"root-bg": "p:yellow",
"root-fg": "p:black",
"session-bg": "p:brightWhite",
"session-fg": "p:purple",
"ubuntu-bg": "#e95420",
"ubuntu-fg": "p:brightWhite",
"win-bg": "#0667b4",
"win-fg": "p:brightWhite",
"black": "#292D3E",
"red": "#F07178",
"green": "#62DE84",
"yellow": "#FFCB6B",
"blue": "#75A1FF",
"purple": "#F580FF",
"cyan": "#60BAEC",
"white": "#ABB2BF",
"brightBlack": "#959DCB",
"brightRed": "#F07178",
"brightGreen": "#C3E88D",
"brightYellow": "#FF5572",
"brightBlue": "#82AAFF",
"brightPurple": "#FFCB6B",
"brightCyan": "#676E95",
"brightWhite": "#FFFEFE",
"foreground": "#BFC7D5",
"background": "#292D3E"
},
"gotham": {
"arch-bg": "#33aadd",
"arch-fg": "p:brightWhite",
"battery-bg": "p:cyan",
"battery-fg": "p:yellow",
"git-bg": "p:cyan",
"git-fg": "p:brightBlue",
"macos-bg": "#652bf2",
"macos-fg": "p:brightWhite",
"path-bg": "p:brightBlue",
"path-fg": "p:black",
"path-special-bg": "p:brightWhite",
"path-special-fg": "p:black",
"raspi-bg": "#cb2755",
"raspi-fg": "p:brightWhite",
"root-bg": "p:yellow",
"root-fg": "p:black",
"session-bg": "p:brightWhite",
"session-fg": "p:purple",
"ubuntu-bg": "#e95420",
"ubuntu-fg": "p:brightWhite",
"win-bg": "#0667b4",
"win-fg": "p:brightWhite",
"black": "#0a0f14",
"red": "#c33027",
"green": "#26a98b",
"yellow": "#edb54b",
"blue": "#195465",
"purple": "#4e5165",
"cyan": "#33859d",
"white": "#98d1ce",
"brightBlack": "#10151b",
"brightRed": "#d26939",
"brightGreen": "#081f2d",
"brightYellow": "#245361",
"brightBlue": "#093748",
"brightPurple": "#888ba5",
"brightCyan": "#599caa",
"brightWhite": "#d3ebe9",
"foreground": "#98d1ce",
"background": "#0a0f14"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment