Skip to content

Instantly share code, notes, and snippets.

@coderhs
Created June 7, 2022 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coderhs/96875e4975b591d36087c4fa013a7787 to your computer and use it in GitHub Desktop.
Save coderhs/96875e4975b591d36087c4fa013a7787 to your computer and use it in GitHub Desktop.
my personal oh-my-posh template
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "red",
"powerline_symbol": "\ue0b0",
"style": "plain",
"template": "\uf0e7 ",
"type": "root"
},
{
"foreground": "blue",
"properties": {
"folder_icon": "\ue5ff",
"folder_separator_icon": " / ",
"home_icon": "\uf7db",
"style": "agnoster"
},
"style": "plain",
"template": "{{ .Path }}",
"type": "path"
},
{
"foreground": "green",
"foreground_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}yellow{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}red{{ end }}",
"{{ if gt .Ahead 0 }}red{{ end }}",
"{{ if gt .Behind 0 }}green{{ end }}"
],
"properties": {
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"github_icon": "\uf408 "
},
"style": "plain",
"template": " on{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<red> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<yellow> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }}",
"type": "git"
},
{
"background": "#29315A",
"foreground": "#E4F34A",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"style": "diamond",
"template": "\ue235{{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}",
"trailing_diamond": "\ue0b4",
"type": "python"
},
{
"background": "#29315A",
"foreground": "#7FD5EA",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"style": "diamond",
"template": "\ufcd1{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
"trailing_diamond": "\ue0b4",
"type": "go"
},
{
"background": "#29315A",
"foreground": "#42E66C",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": true
},
"style": "diamond",
"template": "\ue718{{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}",
"trailing_diamond": "\ue0b4",
"type": "node"
},
{
"background": "#29315A",
"foreground": "#E64747",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": true
},
"style": "diamond",
"template": "\ue791{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
"trailing_diamond": "\ue0b4",
"type": "ruby"
},
{
"background": "#29315A",
"foreground": "#E64747",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"style": "diamond",
"template": "\ue738{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
"trailing_diamond": "\ue0b4",
"type": "java"
},
{
"background": "#29315A",
"foreground": "#9B6BDF",
"leading_diamond": " \ue0b6",
"properties": {
"fetch_version": false
},
"style": "diamond",
"template": "\ue624{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"trailing_diamond": "\ue0b4",
"type": "julia"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#ffbebc",
"leading_diamond": "<#ff70a6> \ue200 </>",
"properties": {
"display_host": true
},
"style": "diamond",
"template": "{{ .UserName }} <#ffffff>on</> ",
"type": "session"
},
{
"foreground": "yellow",
"properties": {
"time_format": "Monday 15:04:05"
},
"style": "plain",
"template": "{{ .CurrentDate | date .Format }} ",
"type": "time"
},
{
"foreground": "green",
"style": "plain",
"template": "\u276f",
"type": "text"
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment