Skip to content

Instantly share code, notes, and snippets.

@daniellwdb
Created July 1, 2024 16:42
Show Gist options
  • Save daniellwdb/175f8c25ee15c43d59b6fe4beca61620 to your computer and use it in GitHub Desktop.
Save daniellwdb/175f8c25ee15c43d59b6fe4beca61620 to your computer and use it in GitHub Desktop.
Custom theme for oh-my-posh based on the pure and nord colour theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"console_title_template": "{{if .Root}}(Admin){{end}} {{.PWD}}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "plain",
"foreground": "#5e81ac",
"template": "{{ .UserName }} "
},
{
"type": "path",
"style": "plain",
"foreground": "#88c0d0",
"template": "{{ .Path }} ",
"properties": {
"style": "full"
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "git",
"style": "plain",
"foreground": "#4c566a",
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#FFAFD7>*</>{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"properties": {
"branch_ahead_icon": "<#88C0D0>\u21e1 </>",
"branch_behind_icon": "<#88C0D0>\u21e3 </>",
"branch_icon": "",
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"github_icon": ""
}
},
{
"type": "node",
"style": "plain",
"template": " \ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
"foreground": "#a3be8c"
},
{
"type": "npm",
"style": "plain",
"powerline_symbol": "\ue0b0",
"template": " \ue71e {{ .Full }} ",
"foreground": "#bf616a"
},
{
"type": "python",
"style": "plain",
"powerline_symbol": "\ue0b0",
"foreground": "#ebcb8b",
"template": " \ue73c {{ .Full }} ",
"properties": {
"display_mode": "files"
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "executiontime",
"style": "plain",
"foreground": "#a3be8c",
"template": " {{ .FormattedMs }} ",
"properties": {
"style": "austin"
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "status",
"style": "plain",
"foreground": "#b48ead",
"foreground_templates": ["{{ if gt .Code 0 }}#BF616A{{ end }}"],
"template": "❯ ",
"properties": {
"always_enabled": true
}
}
],
"newline": true
}
],
"transient_prompt": {
"foreground": "#b48ead",
"foreground_templates": ["{{ if gt .Code 0 }}#BF616A{{ end }}"],
"template": "❯ "
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment