Skip to content

Instantly share code, notes, and snippets.

@whoisryosuke
Created May 17, 2022 19:24
Show Gist options
  • Save whoisryosuke/3b34892672a2a28e14f54dda80348b86 to your computer and use it in GitHub Desktop.
Save whoisryosuke/3b34892672a2a28e14f54dda80348b86 to your computer and use it in GitHub Desktop.
Oh My Posh - My Custom Theme (based on powerlevel10k + night-owl)
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#ffffff",
"foreground": "#000000",
"leading_diamond": "",
"style": "diamond",
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ",
"trailing_diamond": "",
"type": "os"
},
{
"background": "#0000ff",
"foreground": "#000000",
"powerline_symbol": "",
"properties": {
"style": "full"
},
"style": "powerline",
"template": "  ",
"type": "root"
},
{
"background": "#0000ff",
"foreground": "#ffffff",
"powerline_symbol": "",
"properties": {
"style": "full"
},
"style": "powerline",
"template": " {{ .Path }} ",
"type": "path"
},
{
"background": "#D4E157",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#addb67{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f78c6c{{ end }}",
"{{ if gt .Ahead 0 }}#21c7a8{{ end }}",
"{{ if gt .Behind 0 }}#c792ea{{ end }}"
],
"foreground": "#000000",
"powerline_symbol": "",
"style": "powerline",
"properties": {
"branch_icon": "\ue725 ",
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"fetch_worktree_count": true
},
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ .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 }} \uf692 {{ .StashCount }}{{ end }} ",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
{
"background": "#8f43f3",
"foreground": "#ffffff",
"leading_diamond": "",
"style": "diamond",
"template": " \uf85a {{ round .PhysicalPercentUsed .Precision }}% ",
"trailing_diamond": "",
"type": "sysinfo"
},
{
"background": "#303030",
"foreground": "#3C873A",
"powerline_symbol": "",
"style": "powerline",
"properties": {
"style": "full",
"fetch_package_manager": true,
"npm_icon": " <#cc3a3a>\ue71e</> ",
"yarn_icon": " <#348cba>\uf61a</>"
},
"template": "\ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}",
"trailing_diamond": "",
"type": "node"
},
{
"background": "#787CB5",
"foreground": "#000000",
"powerline_symbol": "",
"style": "powerline",
"properties": {
"style": "full"
},
"template": "\ue73d {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
"trailing_diamond": "",
"type": "php"
},
{
"background": "#D4E157",
"foreground": "#000000",
"powerline_symbol": "",
"style": "powerline",
"properties": {
"style": "full"
},
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} <transparent></>",
"type": "python"
},
{
"background": "#7FD5EA",
"foreground": "#ffffff",
"powerline_symbol": "",
"style": "powerline",
"properties": {
"style": "full"
},
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} <transparent></>",
"type": "go"
},
{
"background": "#ffffff",
"foreground": "#000000",
"powerline_symbol": "",
"style": "powerline",
"properties": {
"style": "full",
"time_format": "15:04:05"
},
"template": " {{ .CurrentDate | date .Format }} ",
"trailing_diamond": "",
"type": "time"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#D4E157",
"foreground_templates": ["{{ if gt .Code 0 }}#FF5252{{ end }}"],
"properties": {
"always_enabled": true
},
"style": "plain",
"template": "❯ ",
"type": "exit"
}
],
"type": "prompt"
}
],
"version": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment