Last active
April 10, 2025 17:06
-
-
Save GhostOps77/62c0517f629cabec9d9b0077bdefbf4d to your computer and use it in GitHub Desktop.
My oh-my-posh config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"var": { | |
"shell_icons": { | |
"bash": "\uebca", | |
"cmd": "\uebc4", | |
"fish": "<red><</><orange>></><yellow><</>", | |
"pwsh": "\uebc7", | |
"zsh": "%_" | |
} | |
}, | |
"secondary_prompt": { | |
"template": " ", | |
"foreground": "#fff", | |
"background": "transparent" | |
}, | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"segments": [ | |
{ | |
"properties": { | |
"cache_duration": "none" | |
}, | |
"template": "{{ if .WSL }}<#fff>[</>{{ .Icon }} wsl<#fff>]</>{{ end }}", | |
"type": "os", | |
"style": "plain", | |
"foreground_templates": [ | |
"{{ if eq .Icon \"\uf31b\" }}#e95420{{ end }}", | |
"{{ if eq .Icon \"\uf306\" }}#f00{{ end }}", | |
"{{ if eq .Icon \"\uf303\" }}#5076a7{{ end }}", | |
"#4d4d4d" | |
] | |
}, | |
{ | |
"properties": { | |
"cache_duration": "none", | |
"mapped_locations": { | |
"/mnt/c/": "<#00adef>\ue62a:</>C", | |
"/mnt/d/": "<#00adef>\ue62a:</>D", | |
"/mnt/e/": "<#00adef>\ue62a:</>E", | |
"/mnt/f/": "<#00adef>\ue62a:</>F", | |
"/mnt/g/": "<#00adef>\ue62a:</>G", | |
"/mnt/h/": "<#00adef>\ue62a:</>", | |
"/mnt/h/mouhsen/F/VS-Code": "<#00adef>\ue62a:</><#0078d7>\udb82\ude1e</>", | |
"/mnt/i/": "<#00adef>\ue62a:</>I", | |
"/mnt/j/": "<#00adef>\ue62a:</>J", | |
"H:\\mouhsen\\F\\VS-Code": "<#0078d7>\udb82\ude1e</>" | |
}, | |
"max_depth": 6, | |
"mixed_threshold": 8, | |
"style": "mixed" | |
}, | |
"template": "[{{ if not .Writable }}<#ebd61a>\uf023 </>{{ end }}<#3eb715>{{ $git := .Segments.Git }}{{ if $git.Dir }}\ue65d <b>{{ path $git.RepoName $git.Dir }} </b>{{ if ne $git.RepoName .Path}}{{ $trimmedpath := (trimPrefix $git.Dir .PWD) }}{{ if $trimmedpath }}{{ path $trimmedpath .Location }}{{ end }}{{ end }}{{ else }}\ue5ff {{ path .Path .Location }}{{ end }}</>]", | |
"type": "path", | |
"style": "plain" | |
}, | |
{ | |
"properties": { | |
"branch_max_length": 25, | |
"cache_duration": "none", | |
"fetch_upstream_icon": true, | |
"git_icon": "", | |
"github_icon": "\uf408" | |
}, | |
"template": "[<#f14e32>{{ url .UpstreamIcon .UpstreamURL }} {{ .HEAD }}</>]", | |
"type": "git", | |
"style": "plain", | |
"min_width": 90 | |
}, | |
{ | |
"properties": { | |
"cache_duration": "none" | |
}, | |
"template": "{{if .Context}}[<#0B59E7>\uf308 {{ .Context }}</>]{{end}}", | |
"type": "docker", | |
"style": "plain", | |
"min_width": 100 | |
}, | |
{ | |
"properties": { | |
"cache_duration": "none" | |
}, | |
"template": "[<#ffde57>\ue235 {{ if .Error }}{{ .Error }}{{ else }}v{{ .Full }}{{ if .Venv }} ({{ .Venv }}){{ end }}{{ end }}</>]", | |
"type": "python", | |
"style": "plain", | |
"min_width": 110 | |
}, | |
{ | |
"properties": { | |
"cache_duration": "none" | |
}, | |
"template": "\n", | |
"type": "text", | |
"style": "plain" | |
}, | |
{ | |
"properties": { | |
"cache_duration": "none" | |
}, | |
"template": "<#fff>[</>{{ if .Root }}<#f00>\uf071</> {{ end }}{{ get .Var.shell_icons .Name }}{{ if not (hasKey .Var.shell_icons .Name)}}.Name{{ end }}<#fff>{{ if .Segments.Session.SSHSession }}<#8710e0> \ueba9</>{{ end }}]</>", | |
"type": "shell", | |
"style": "plain", | |
"foreground_templates": [ | |
"{{ if eq .Name \"pwsh\" }}#0077c2{{ end }}", | |
"{{ if eq .Name \"bash\" }}#c2c2c0{{ end }}", | |
"{{ if eq .Name \"cmd\" }}#c2c2c0{{ end }}", | |
"{{ if eq .Name \"zsh\" }}#e95420{{ end }}" | |
] | |
}, | |
{ | |
"properties": { | |
"always_enabled": true, | |
"cache_duration": "none", | |
"style": "austin", | |
"threshold": 0 | |
}, | |
"template": " {{ .FormattedMs }} ", | |
"foreground": "#8800dd", | |
"type": "executiontime", | |
"style": "plain" | |
}, | |
{ | |
"properties": { | |
"always_enabled": true, | |
"cache_duration": "none" | |
}, | |
"template": "❯", | |
"type": "status", | |
"style": "plain", | |
"foreground_templates": [ | |
"{{ if gt .Code 0 }}#f1184c{{ end }}" | |
] | |
} | |
], | |
"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