Skip to content

Instantly share code, notes, and snippets.

@BoscoDomingo
Last active May 26, 2024 21:10
Show Gist options
  • Save BoscoDomingo/62f35772e52178b31353a99d2d80ca77 to your computer and use it in GitHub Desktop.
Save BoscoDomingo/62f35772e52178b31353a99d2d80ca77 to your computer and use it in GitHub Desktop.
My personal Oh-my-posh theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#252b32",
"foreground": "yellow",
"powerline_symbol": "",
"leading_diamond": "\ue0c5",
"properties": {
"alpine": " ",
"arch": " ",
"centos": " ",
"debian": " ",
"elementary": " ",
"fedora": " ",
"gentoo": " ",
"linux": " ",
"macos": " ",
"manjaro": " ",
"mint": " ",
"opensuse": " ",
"raspbian": " ",
"ubuntu": " ",
"windows": " ",
"wsl": " ",
"wsl_separator": " on "
},
"style": "diamond",
"template": " {{ if .WSL }}  {{ end }}{{.Icon}} ",
"type": "os"
},
{
"background": "#00ffff",
"foreground": "#5e5e5e",
"powerline_symbol": "",
"style": "powerline",
"template": " {{ if .SSHSession }} {{ .UserName }}@{{ .HostName }}{{ end }} ",
"type": "session"
},
{
"background": "#003543",
"foreground": "#d2ff5e",
"powerline_symbol": "",
"properties": {
"folder_icon": "..",
"folder_separator_icon": "/",
"home_icon": " ",
"max_depth": 2,
"style": "agnoster"
},
"style": "accordion",
"type": "path"
},
{
"background": "#d2ff5e",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffe047{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}magenta{{ end }}",
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
"{{ if gt .Behind 0 }}#f17c37{{ end }}"
],
"foreground": "#193549",
"powerline_symbol": "",
"properties": {
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true
},
"style": "powerline",
"template": "{{ .UpstreamIcon }}{{ trunc 64 .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
/* {
"background": "#f36943",
"background_templates": [
"{{if eq \"Charging\" .State.String}}#33DD2D{{end}}",
"{{if eq \"Discharging\" .State.String}}#FFCD58{{end}}",
"{{if eq \"Full\" .State.String}}#0476d0{{end}}"
],
"foreground": "#242424",
"invert_powerline": true,
"powerline_symbol": "",
"style": "accordion",
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}%{{ end }}{{ .Error }} ",
"type": "battery",
"properties": {
"discharging_icon": " ",
"charging_icon": " ",
"not_charging_icon": " ",
"charged_icon": " "
}
}, */
{
"background": "#003544",
"foreground": "#fff200",
"invert_powerline": true,
"powerline_symbol": "",
"properties": {
"display_mode": "context",
"fetch_virtual_env": true
},
"style": "powerline",
"template": "  {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }} {{ .Full }}{{ end }} ",
"type": "python"
},
{
"background": "lightCyan",
"foreground": "black",
"invert_powerline": true,
"powerline_symbol": "",
"properties": {
"fetch_version": true
},
"style": "powerline",
"template": "ﳑ Go {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "go"
},
// {
// "background": "white",
// "foreground": "red",
// "invert_powerline": true,
// "powerline_symbol": "",
// "style": "powerline",
// "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
// "type": "java"
// },
{
"background": "#66cc33", //"#96ff1f",
"foreground": "#333333",
"invert_powerline": true,
"powerline_symbol": "",
"properties": {
"fetch_version": true
},
"style": "powerline",
"template": "  {{ .Full }} ",
"type": "node"
},
// {
// "background": "red",
// "foreground": "black",
// "invert_powerline": true,
// "powerline_symbol": "",
// "properties": {
// "display_mode": "files",
// "fetch_version": true
// },
// "style": "powerline",
// "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
// "type": "ruby"
// },
{
"background": "lightYellow",
"foreground": "black",
"invert_powerline": true,
"powerline_symbol": "",
"style": "powerline",
"template": " {{ .Context }}{{ if .Namespace }} :: {{ .Namespace }}{{ end }} ",
"type": "kubectl"
},
{
"type": "docker",
"style": "powerline",
"foreground": "#00d0ff",
"background": "#ffffff",
"template": "  {{ .Context }} ",
"invert_powerline": true,
"powerline_symbol": ""
},
{
"background": "#990000",
"foreground": "white",
"invert_powerline": true,
"powerline_symbol": "",
"properties": {
"always_enabled": true
},
"style": "powerline",
"template": " {{ if gt .Code 0 }}❌ {{ .Meaning }}{{ else }}{{ end }} ", //
"type": "exit"
},
{
"background": "#ff9100",
"foreground": "#3f3f3f",
"invert_powerline": true,
"powerline_symbol": "",
"properties": {
"style": "roundrock",
"threshold": 0
},
"style": "accordion",
"template": " {{ .FormattedMs }} ", //⌛
"type": "executiontime"
},
{
// "background": "#003543",
// "foreground": "#fff",
"background": "#00ffff",
"foreground": "#3f3f3f",
"invert_powerline": true,
"powerline_symbol": "",
"trailing_diamond": "\ue0c7", //\ue0c5",//"⛆",// "░",
"style": "diamond",
"template": " {{ .CurrentDate | date .Format }}  ",
"type": "time"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"background": "magenta",
"foreground": "#FFD700",
"powerline_symbol": "",
"style": "powerline",
"template": "🔓",
"type": "root"
},
{
"background": "transparent",
// "foreground": "#a6ff00",
"foreground": "yellow",
"powerline_symbol": "",
"trailing_diamond": "\ue0c7",
"leading_diamond": "\ue0c5",
"style": "diamond",
"template": " ⚡", //"\u2800",
"type": "text"
}
],
"type": "prompt"
}
],
"console_title_template": "{{ .Folder }} {{.UserName}}@{{.HostName}}",
"final_space": true,
"version": 2
}
@BoscoDomingo
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment