Skip to content

Instantly share code, notes, and snippets.

@tomas-st
Last active February 8, 2025 13:22
Show Gist options
  • Save tomas-st/1a39abe94e1b44a6d6cd5bebc0cd1300 to your computer and use it in GitHub Desktop.
Save tomas-st/1a39abe94e1b44a6d6cd5bebc0cd1300 to your computer and use it in GitHub Desktop.
posh-config.json
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"properties": {
"cache_duration": "none",
"time_format": "15:04"
},
"template": "Ubuntu [{{ .CurrentDate | date .Format }}] ",
"foreground": "#afe6ff",
"type": "time",
"style": "plain"
},
{
"properties": {
"cache_duration": "none",
"style": "agnoster_full"
},
"leading_diamond": "\ue0b6",
"template": "\u2388 {{.Context}}",
"foreground": "#61AFEF",
"powerline_symbol": "\ue0b0",
"type": "kubectl",
"style": "plain"
}
],
"newline": true
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"properties": {
"cache_duration": "none",
"style": "agnoster_full"
},
"template": "{{if .Namespace}} : {{.Namespace}}{{end}} ",
"foreground": "#61AFEF",
"type": "kubectl",
"style": "plain"
}
]
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"properties": {
"cache_duration": "none",
"style": "full"
},
"template": "\ue5ff {{ .Path }}",
"foreground": "#afe6ff",
"type": "path",
"style": "plain"
},
{
"properties": {
"branch_max_length": 25,
"cache_duration": "none",
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true
},
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ 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 }} \ueb4b {{ .StashCount }}{{ end }} ",
"foreground": "#F3C267",
"type": "git",
"style": "plain",
"foreground_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": {
"cache_duration": "none"
},
"template": " x{{ reason .Code }}",
"foreground": "#b8ff75",
"type": "status",
"style": "plain",
"foreground_templates": [
"{{ if gt .Code 0 }}#E06C75{{ end }}"
]
}
],
"newline": true
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "python",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#100e23",
"background": "#906cff",
"template": "  {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}"
},
{
"properties": {
"cache_duration": "none"
},
"template": "!",
"foreground": "#E06C75",
"type": "root",
"style": "plain"
},
{
"properties": {
"cache_duration": "none"
},
"template": "❯",
"foreground": "#E06C75",
"type": "text",
"style": "plain"
}
],
"newline": true
}
],
"version": 3,
"final_space": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment