Skip to content

Instantly share code, notes, and snippets.

@m0rphed
Created April 4, 2026 19:12
Show Gist options
  • Select an option

  • Save m0rphed/c0061a211dfd2c1eb0dd75899bbace53 to your computer and use it in GitHub Desktop.

Select an option

Save m0rphed/c0061a211dfd2c1eb0dd75899bbace53 to your computer and use it in GitHub Desktop.
Oh My Posh config mod v2
"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json"
version = 3
final_space = true
[[blocks]]
type = "prompt"
alignment = "left"
newline = true
[[blocks.segments]]
type = "session"
style = "plain"
powerline_symbol = "ξ‚°"
template = "{{ .UserName }}@{{ .HostName }}"
foreground = "#8080c0"
[[blocks.segments]]
type = "shell"
style = "plain"
foreground = "#40efa7"
template = " 🐚 {{ .Name }}"
[blocks.segments.options.mapped_shell_names]
pwsh = "pwsh"
powershell = "pwsh"
cmd = "cmd"
bash = "bash"
[[blocks.segments]]
type = "git"
style = "plain"
foreground = "#F3C267"
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 }}"
]
template = " {{ .UpstreamIcon }} {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} ξ­‹ {{ .StashCount }}{{ end }} "
[blocks.segments.options]
branch_template = "{{ trunc 25 .Branch }}"
fetch_status = true
fetch_upstream_icon = true
[[blocks]]
type = "prompt"
alignment = "right"
[[blocks.segments]]
type = "status"
style = "plain"
foreground = "#b8ff75"
foreground_templates = [ "{{ if gt .Code 0 }}#E06C75{{ end }}" ]
template = " x{{ reason .Code }}"
[[blocks.segments]]
type = "executiontime"
style = "diamond"
foreground = "#b8ff75"
foreground_templates = [ "{{ if gt .Code 0 }}#E06C75{{ end }}" ]
template = " {{ .FormattedMs }}"
[blocks.segments.options]
style = "roundrock"
always_enabled = true
[[blocks]]
type = "prompt"
alignment = "left"
newline = true
[[blocks.segments]]
type = "path"
style = "plain"
foreground = "#61AFEF"
template = "{{ .Path }}"
[blocks.segments.options]
style = "full"
[[blocks]]
type = "prompt"
alignment = "left"
newline = true
[[blocks.segments]]
type = "text"
style = "plain"
foreground = "#a880ff"
template = "❯"
[transient_prompt]
background = "transparent"
foreground = "#7500db"
template = "{{ if gt .Code 0 }}[x] {{ .Folder }} {{ else }}[βœ“] {{ .Folder }} {{ end }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment