Skip to content

Instantly share code, notes, and snippets.

@qyurila
Created February 14, 2023 08:56
Show Gist options
  • Save qyurila/b26614f65d9a79577b0fc08668dcdced to your computer and use it in GitHub Desktop.
Save qyurila/b26614f65d9a79577b0fc08668dcdced to your computer and use it in GitHub Desktop.
A personal oh-my-posh config file
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
final_space: true
version: 2
palette:
foreground: '#BFBDB6'
foreground-dark: '#6C7380'
accent: '#E6B450'
error: '#D95757'
syntax-blue: '#39BAE6'
syntax-cyan: '#95E6CB'
syntax-green: '#AAD94C'
syntax-purple: '#D2A6FF'
syntax-red: '#F07178'
syntax-yellow: '#FFB454'
syntax-orange: '#FF8F40'
syntax-coral: '#F29668'
syntax-salmon: '#E6B673'
vsc-green: '#7FD962'
vsc-red: '#F26D78'
blocks:
- alignment: right
segments:
- type: ytm
style: plain
foreground: p:foreground-dark
template:
"\
\uf144 \
{{ if eq .Status \"stopped\" }}Not Playing\
{{ else }}{{ abbrev 20 .Artist }} - {{ abbrev 60 .Track }}{{ end }} \
{{ .Icon }}\
"
type: prompt
- alignment: left
newline: true
segments:
- type: shell
style: plain
foreground: p:syntax-red
template: "\ue795 {{ .Name }} "
properties:
mapped_shell_names:
pwsh: Shell
powershell: Shell
cmd: Cmd
bash: Bash
- type: git
style: plain
foreground: p:syntax-yellow
foreground_templates:
- "{{ if or (.Working.Changed) (.Staging.Changed) }}p:syntax-coral{{ end }}"
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:syntax-orange{{ end }}"
- "{{ if gt .Ahead 0 }}p:syntax-purple{{ end }}"
- "{{ if gt .Behind 0 }}p:syntax-purple{{ end }}"
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 }}\uf692 {{ .StashCount }} {{ end }}\
"
properties:
branch_max_length: 25
fetch_stash_count: true
fetch_status: true
fetch_upstream_icon: true
- type: node
style: plain
foreground: p:syntax-green
template: "\uf898 {{ .Full }}"
- type: python
style: plain
foreground: p:syntax-salmon
template: "\uE235 {{ .Full }}"
- type: rust
style: plain
foreground: p:error
template: "\uE7a8 {{ .Full }}"
- type: go
style: plain
foreground: p:syntax-cyan
template: "\uFCD1 {{ .Full }}"
- type: dotnet
style: plain
foreground: p:syntax-purple
template: "\uE77F {{ .Full }}"
type: prompt
- alignment: right
overflow: hide
segments:
- type: time
style: plain
foreground: p:accent
template: "\uf017 {{ .CurrentDate | date .Format }}"
properties:
time_format: 15:04:05
type: prompt
- alignment: left
newline: true
segments:
- foreground: p:syntax-blue
properties:
style: full
style: plain
template: "\ue5ff {{ .Path }}"
type: path
type: prompt
- alignment: right
newline: false
segments:
- type: exit
style: plain
foreground: p:vsc-green
foreground_templates:
- "{{ if gt .Code 0 }}p:vsc-red{{ end }}"
template: "x {{ .Meaning }}"
- foreground: p:vsc-green
foreground_templates:
- "{{ if gt .Code 0 }}p:vsc-red{{ end }}"
properties:
style: roundrock
always_enabled: true
style: diamond
template: " {{ .FormattedMs }}"
type: executiontime
type: prompt
- alignment: left
newline: true
segments:
- foreground: p:syntax-red
style: plain
template: "\u0021"
type: root
- foreground: p:syntax-red
style: plain
template: "\u276f"
type: text
type: prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment