Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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