Skip to content

Instantly share code, notes, and snippets.

@krnd
Last active November 23, 2021 09:11
Show Gist options
  • Save krnd/6cbf63d7fa3895c8d9305162987dd118 to your computer and use it in GitHub Desktop.
Save krnd/6cbf63d7fa3895c8d9305162987dd118 to your computer and use it in GitHub Desktop.
oh-my-posh
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
// =====================< General >=====================
"final_space": true,
"osc99": true,
// =====================< Console Title >===============
/* REVISIT */
"console_title": true,
"console_title_style": "folder",
"console_title_template": "{{ .Shell }} in {{ .Folder }}",
// =====================< Transient Prompt >============
"transient_prompt": {
"template": "\u276f "
},
// =====================< Blocks >======================
"blocks": [
// ----------------------< Left Header >------------
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "session",
"style": "powerline",
"foreground": "#E6E6E6",
"background": "#68217A",
"powerline_symbol": "\uE0BC",
"properties": {
"display_user": true,
"display_host": false
}
},
{
"type": "path",
"style": "powerline",
"foreground": "#E6E6E6",
"background": "#007ACC",
"powerline_symbol": "\uE0BC",
"properties": {
// cspell:ignore agnoster
"style": "agnoster_short",
"max_depth": 3,
"folder_separator_icon": " \uE0BB ",
"mapped_locations": {}
}
},
{
"type": "git",
"style": "powerline",
"foreground": "#1A1A1A",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#E29031{{ end }}",
"{{ if (gt .Behind 0) }}#E45454{{ end }}",
"{{ if (eq .Behind 0) }}#0A703E{{ end }}"
],
"powerline_symbol": "\uE0BC",
"properties": {
"fetch_status": true,
"fetch_stash_count": true,
"fetch_worktree_count": true,
"fetch_upstream_icon": 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 }}"
}
}
]
},
// ----------------------< Right Header >-----------
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"type": "python",
"style": "diamond",
"foreground": "#E6E6E6",
"background": "#333333",
"leading_diamond": "\uE0BA",
"trailing_diamond": "\uE0BC",
"properties": {
"postfix": " \uE0BB py ",
"display_mode": "context",
"display_virtual_env": true,
"display_version": true,
"display_default": true,
"display_error": true
}
}
]
},
// ----------------------< Left Prompt >------------
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "text",
"style": "plain",
"foreground": "#E6E6E6",
"properties": {
"text": "\u276f",
"prefix": "",
"postfix": ""
}
}
]
},
// ----------------------< Right Prompt >-----------
{
// cspell:ignore rprompt
"type": "rprompt",
"alignment": "right",
"segments": [
{
"type": "root",
"style": "diamond",
"foreground": "#E6E6E6",
"background": "#E45454",
"leading_diamond": "\uE0BA",
"trailing_diamond": "\uE0BC",
"properties": {
"root_icon": "ROOT"
}
}
]
}
],
// =====================< Tooltips >====================
"tooltips": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment