Skip to content

Instantly share code, notes, and snippets.

@lifenstein
Last active December 13, 2021 12:57
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 lifenstein/d51ea88582f6049a0ae632d86f5991d6 to your computer and use it in GitHub Desktop.
Save lifenstein/d51ea88582f6049a0ae632d86f5991d6 to your computer and use it in GitHub Desktop.
OhMyPosh Theme with Execution time, Exit result, Admin status, Path, Git Status
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"final_space": true,
"osc99": false,
"console_title": false,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "executiontime",
"style": "powerline",
"foreground": "#ffffff",
"background": "#0074d9",
"properties": {
"always_enabled": true
}
},
{
"type": "exit",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"background": "#0fb600",
"foreground": "#ffffff",
"background_templates": ["{{ if gt .Code 0 }}#ff0044{{ end }}"],
"properties": {
"always_enabled": true,
"template": "\uE00A"
}
},
{
"type": "root",
"style": "diamond",
"trailing_diamond": "\uE0C6",
"foreground": "#111111",
"background": "#ffff66",
"properties": {
"root_icon": "\uE238 Admin"
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
"newline": true,
"segments": [
{
"type": "path",
"style": "powerline",
"foreground": "#ffffff",
"background": "#313131",
"properties": {
"style": "agnoster_short",
"max_depth": 5
}
},
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#000000",
"background": "#ffffff",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
"{{ if gt .Behind 0 }}#B388FF{{ end }}"
],
"properties": {
"fetch_status": true,
"fetch_stash_count": true,
"template": "{{ .HEAD }}{{ .BranchStatus }}{{ 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 }} \uF692 {{ .StashCount }}{{ end }}"
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "text",
"style": "plain",
"properties": {
"prefix": "",
"postfix": "",
"text": "\u276F"
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment