dotfiles/.config/oh-my-posh/config.yaml

81 lines
2.2 KiB
YAML

# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version: 2
final_space: true
pwd: osc7
disable_cursor_positioning: true
blocks:
- type: prompt
alignment: left
newline: true
segments:
- type: path
style: plain
foreground: "#999"
template: "<b><i>{{ .Path }}</i></b> "
properties:
style: full
- type: prompt
alignment: right
filler: "<#333>⎯</>"
segments:
- type: git
style: plain
foreground: "#777"
foreground_templates:
- "{{ if or (.Working.Changed) (.Staging.Changed) }}#3b8{{ end }}"
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#3b8{{ end }}"
- "{{ if gt .Ahead 0 }}#B388FF{{ end }}"
- "{{ if gt .Behind 0 }}#B388FB{{ end }}"
template: " <i>{{ .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 }}</i>"
properties:
fetch_status: true
- type: rprompt
segments:
- type: executiontime
style: plain
foreground: "#c93"
template: "<i>󱦟 {{ .FormattedMs }}</i>"
properties:
threshold: 500
- type: session
style: plain
foreground: "#666"
template: " <i>{{ .UserName }}@{{ .HostName }}</i>"
- type: time
style: plain
foreground: "#666"
template: " <i>{{ .CurrentDate | date .Format }}</i>"
properties:
time_format: "15:04"
- type: prompt
alignment: left
newline: true
segments:
- type: path
style: plain
foreground: "#678"
template: "<i>{{ .Path }}</i>"
properties:
style: folder
- type: text
style: plain
foreground: "#6c9"
template: " %"
properties:
style: folder
transient_prompt:
background: transparent
foreground: "#6c9"
template: "\n%% "
filler: "-"