Skip to content

Instantly share code, notes, and snippets.

@syntruth
Created June 19, 2024 21:44
Show Gist options
  • Save syntruth/54b6e9ab9a5c383ce81bb18765a116ee to your computer and use it in GitHub Desktop.
Save syntruth/54b6e9ab9a5c383ce81bb18765a116ee to your computer and use it in GitHub Desktop.
Syntruth Oh My Posh Theme
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version = 2
console_title_template = '{{ .Folder }}'
[palette]
blue = "#2c699a"
green = "#16db93"
lightblue = "#048ba8"
orange = "#f29e4c"
purple = "#54478c"
red = "#e94a47"
white = "#ffffff"
yellow = "#efea5a"
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'time'
style = 'diamond'
foreground = 'p:lightblue'
template = '{{ .CurrentDate | date .Format }} '
[blocks.segments.properties]
time_format = 'Mon 15:04'
[[blocks.segments]]
type = 'path'
style = 'plain'
foreground = 'p:orange'
template = '{{ .Path }} '
[blocks.segments.properties]
folder_separator_icon = ' 󰁕 '
home_icon = ''
style = 'full'
[[blocks.segments]]
type = 'git'
style = 'diamond'
foreground = 'p:yellow'
template = '{{ .UpstreamIcon }}{{ last (splitList "/" .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.properties]
branch_icon = ' '
fetch_stash_count = true
fetch_status = true
fetch_upstream_icon = true
fetch_worktree_count = true
[[blocks]]
type = 'prompt'
alignment = 'right'
[[blocks.segments]]
type = 'status'
style = 'plain'
foreground_templates = ['{{ if gt .Code 0 }}p:red{{else}}p:green{{ end }}']
template = "{{ if gt .Code 0 }}  {{ else }}  {{ end }}"
[blocks.segments.properties]
always_enabled = true
[[blocks.segments]]
type = 'executiontime'
style = 'diamond'
foreground = 'p:lightblue'
template = '{{ .FormattedMs }}s'
[blocks.segments.properties]
style = 'dallas'
threshold = 0.0
[[blocks.segments]]
type = 'root'
style = 'diamond'
template = '  '
[blocks.segments.properties]
root_icon = ' '
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'session'
style = 'plain'
foreground = 'p:blue'
template = '{{ .UserName }}{{ if .SSHSession }}@{{ .HostName }}{{ end }} <p:purple></> '
[blocks.segments.properties]
display_host = true
[transient_prompt]
foreground = 'p:purple'
background = 'transparent'
template = ' '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment