dotfiles/oh-my-posh/.config/oh-my-posh/jleechpe.omp.dhall

603 lines
24 KiB
Text
Raw Normal View History

2025-05-18 21:11:21 -04:00
let theme_base =
{ bg = "#2b303b"
, bg-alt = "#232830"
, base0 = "#1B2229"
, base1 = "#1c1f24"
, base2 = "#202328"
, base3 = "#2F3237"
, base4 = "#4f5b66"
, base5 = "#65737E"
, base6 = "#73797e"
, base7 = "#9ca0a4"
, base8 = "#DFDFDF"
, fg = "#c0c5ce"
, fg-alt = "#c0c5ce"
, red = "#BF616A"
, orange = "#D08770"
, green = "#A3BE8C"
, blue = "#8FA1B3"
, violet = "#b48ead"
, teal = "#4db5bd"
, yellow = "#ECBE7B"
, dark-blue = "#2257A0"
, magenta = "#c678dd"
, cyan = "#46D9FF"
, dark-cyan = "#5699AF"
}
let theme =
{ bg = theme_base.bg
, bg-alt = theme_base.bg-alt
, base0 = theme_base.base0
, base1 = theme_base.base1
, base2 = theme_base.base2
, base3 = theme_base.base3
, base4 = theme_base.base4
, base5 = theme_base.base5
, base6 = theme_base.base6
, base7 = theme_base.base7
, base8 = theme_base.base8
, fg = theme_base.fg
, grey = theme_base.base4
, red = theme_base.red
, orange = theme_base.orange
, green = theme_base.green
, blue = theme_base.blue
, violet = theme_base.violet
, teal = theme_base.teal
, yellow = theme_base.yellow
, dark-blue = theme_base.dark-blue
, magenta = theme_base.magenta
, cyan = theme_base.cyan
, dark-cyan = theme_base.dark-cyan
, highlight = theme_base.orange
, selection = theme_base.base4
, builtin = theme_base.orange
, comments = theme_base.dark-cyan
, constants = theme_base.orange
, functions = theme_base.blue
, keywords = theme_base.violet
, methods = theme_base.blue
, operators = theme_base.fg
, type = theme_base.yellow
, strings = theme_base.green
, variables = theme_base.red
, numbers = theme_base.orange
, region = theme_base.base4
, error = theme_base.red
, warning = theme_base.yellow
, success = theme_base.green
, vc-modified = theme_base.orange
, vc-added = theme_base.green
, vc-deleted = theme_base.red
, hidden = theme_base.bg-alt
, frame = theme_base.red
, iac-bg = theme_base.dark-blue
, vcs-bg = theme_base.base4
, k8s-bg = theme_base.base4
, cloud-bg = theme_base.blue
, cloud-fg = theme_base.base0
, direnv-fg = theme_base.yellow
, proglang-bg = theme_base.violet
}
let symbols =
{ left_hard = ""
, left_hard_inverse = ""
, left_soft = ""
, right_hard = ""
, right_hard_inverse = ""
, right_soft = ""
, tleft_frame = "╭─"
, bleft_frame = "╰─"
, tright_frame = "─╮"
, bright_frame = "─╯"
, prompt_char = ""
, k8s = " 󱃾 "
, gcp = "  "
, az = "  "
, fossil = "F"
, pulumi = " 󰵆 "
, terraform = " 󱁢 "
, direnv = " ▼ "
, python = "  "
, helm = "󰷀 "
, ssh = ""
}
let prompt =
\(block : { segment : Bool }) ->
let properties_type =
{ fetch_status : Optional Bool
, fetch_upstream_icon : Optional Bool
, style : Optional Text
, always_enabled : Optional Bool
, fetch_stack : Optional Bool
, fetch_about : Optional Bool
, fetch_version : Optional Bool
, display_mode : Optional Text
, http_timeout : Optional Natural
, cache_timeout : Optional Natural
}
let make_properties =
\(args : properties_type) ->
{ style = args.style
, fetch_upstream_icon = args.fetch_upstream_icon
, fetch_status = args.fetch_status
, always_enabled = args.always_enabled
, fetch_stack = args.fetch_stack
, fetch_about = args.fetch_about
, fetch_version = args.fetch_version
, display_mode = args.display_mode
, http_timeout = args.http_timeout
, cache_timeout = args.cache_timeout
}
let properties =
{ Type = properties_type
, default =
{ style = None Text
, fetch_upstream_icon = None Bool
, fetch_status = None Bool
, always_enabled = None Bool
, fetch_stack = None Bool
, fetch_about = None Bool
, fetch_version = None Bool
, display_mode = None Text
, http_timeout = None Natural
, cache_timeout = None Natural
}
}
let segment_type =
{ style : Text
, type : Text
, template : Optional Text
, templates_logic : Optional Text
, templates : Optional (List Text)
, leading_diamond : Optional Text
, trailing_diamond : Optional Text
, powerline_symbol : Optional Text
, leading_powerline_symbol : Optional Text
, foreground : Optional Text
, foreground_templates : Optional (List Text)
, background : Optional Text
, background_templates : Optional (List Text)
, properties : Optional properties_type
}
let make_segment =
\(args : segment_type) ->
{ style = args.style
, type = args.type
, template = args.template
, templates_logic = args.templates_logic
, templates = args.templates
, leading_diamond = args.leading_diamond
, trailing_diamond = args.trailing_diamond
, powerline_symbol = args.powerline_symbol
, leading_powerline_symbol = args.leading_powerline_symbol
, foreground = args.foreground
, foreground_templates = args.foreground_templates
, background = args.background
, background_templates = args.background_templates
, properties = args.properties
}
let segment =
{ Type = segment_type
, default =
{ style = "powerline"
, template = None Text
, templates_logic = None Text
, templates = None (List Text)
, leading_diamond = Some symbols.right_hard
, trailing_diamond = Some symbols.left_hard
, powerline_symbol = Some symbols.left_hard
, leading_powerline_symbol = None Text
, foreground = Some theme.fg
, foreground_templates = None (List Text)
, background = Some theme.bg
, background_templates = None (List Text)
, properties = None properties_type
}
}
let block_type =
{ type : Text
, alignment : Text
, segments : List segment_type
, newline : Optional Bool
}
let block =
{ Type = block_type
, default =
{ type = "prompt", alignment = "left", newline = None Bool }
}
let make_block =
\(args : block_type) ->
{ type = args.type
, alignment = args.alignment
, segments = args.segments
, newline = args.newline
}
let rpsegments =
[ make_segment
segment::{
, type = "project"
, powerline_symbol = Some symbols.right_hard_inverse
, leading_powerline_symbol = Some symbols.right_hard
}
, make_segment
segment::{
, type = "ipify"
, style = "diamond"
, background = Some theme.bg-alt
, trailing_diamond = Some
"<${theme.frame},transparent>${symbols.bright_frame}</>"
, leading_diamond = None Text
, template = Some
( "{{if or .Segments.Project.Name .Segments.Project.Version}}{{else}}"
++ "<${theme.bg-alt},transparent>${symbols.right_hard}</>{{end}}"
++ " {{ .IP }} "
)
, properties = Some
( make_properties
properties::{
, http_timeout = Some 1000
, cache_timeout = Some 60
}
)
}
]
let l1segments =
[ make_segment
segment::{
, type = "os"
, trailing_diamond = None Text
, leading_diamond = Some
"<${theme.frame},transparent>${symbols.tleft_frame}</>"
, style = "diamond"
, background = Some theme.base4
, foreground = Some theme.yellow
}
, make_segment segment::{ type = "path" }
, make_segment
segment::{
, type = "git"
, style = "accordion"
, background = Some theme.vcs-bg
, properties = Some
( make_properties
properties::{
, fetch_status = Some True
, fetch_upstream_icon = Some True
}
)
, template = Some
" {{if .UpstreamURL}}{{ .UpstreamIcon }}{{ end}}{{.HEAD}}"
, foreground_templates = Some
[ "{{if or .Ahead .Behind }}${theme.red}{{end}}"
, "{{if or .Working.Changed .Staged.Changed}}${theme.orange}{{end}}"
, theme.fg
]
}
, make_segment
segment::{
, type = "fossil"
, background = Some theme.vcs-bg
, style = "accordion"
, template = Some "${symbols.fossil}"
}
]
let l2segments =
[ make_segment
segment::{
, type = "shell"
, style = "diamond"
, leading_diamond = Some
"<${theme.frame},transparent>${symbols.bleft_frame}</>"
, trailing_diamond = None Text
, background = Some theme.bg-alt
, template = Some "  {{ .Name }} "
, foreground_templates = Some
[ "{{if eq .Name \"fish\"}}${theme.dark-blue}{{end}}"
, "{{if eq .Name \"pwsh\"}}${theme.orange}{{end}}"
]
}
, make_segment
segment::{
, type = "text"
, style = "powerline"
, template = Some symbols.prompt_char
, foreground_templates = Some
[ "{{if gt .Segments.Status.Code 0}}${theme.cyan}{{end}}"
, theme.dark-blue
]
, background_templates = Some
[ "{{if gt .Segments.Status.Code 0}}${theme.red}{{end}}"
, theme.green
]
}
]
let rsegments =
[ make_segment
segment::{
, type = "status"
, background = Some theme.red
, powerline_symbol = Some symbols.right_hard_inverse
, leading_powerline_symbol = Some symbols.right_hard
}
, make_segment
segment::{
, type = "executiontime"
, powerline_symbol = Some symbols.right_hard_inverse
, leading_powerline_symbol = Some symbols.right_hard
, properties = Some
(make_properties properties::{ style = Some "galveston" })
, background = Some theme.base4
, foreground_templates = Some
[ "{{if gt .Ms 600000}}${theme.red}{{end}}", theme.base0 ]
}
, make_segment
segment::{
, type = "session"
, powerline_symbol = Some symbols.right_hard_inverse
, leading_powerline_symbol = Some symbols.right_hard
, foreground = Some theme.orange
, background = Some theme.bg-alt
, templates = Some
[ " {{ if .SSHSession }}${symbols.ssh} {{ end }}"
, "{{ if matchP \"wezterm-mux-server\" .Env.WEZTERM_EXECUTABLE }}${symbols.ssh}{{end}}"
, " {{ .UserName }}@{{ .HostName }} "
]
, templates_logic = Some "join"
}
, make_segment
segment::{
, type = "az"
, background = Some theme.cloud-bg
, foreground = Some theme.cloud-fg
, powerline_symbol = Some symbols.right_hard_inverse
, leading_powerline_symbol = Some symbols.right_hard
, template = Some symbols.az
}
, make_segment
segment::{
, type = "gcp"
, background = Some theme.cloud-bg
, foreground = Some theme.cloud-fg
, powerline_symbol = Some symbols.right_hard_inverse
, leading_powerline_symbol = Some symbols.right_hard
, template = Some symbols.gcp
}
, make_segment
segment::{
, type = "kubectl"
, background = Some theme.k8s-bg
, template = Some symbols.k8s
, powerline_symbol = Some symbols.right_hard_inverse
, leading_powerline_symbol = Some symbols.right_hard
}
, make_segment
segment::{
, type = "helm"
, background = Some theme.k8s-bg
, template = Some symbols.helm
, leading_powerline_symbol = Some symbols.right_hard_inverse
, powerline_symbol = None Text
, properties = Some
( make_properties
properties::{ display_mode = Some "files" }
)
}
, make_segment
segment::{
, type = "pulumi"
, powerline_symbol = Some symbols.right_hard_inverse
, background = Some theme.iac-bg
, properties = Some
( make_properties
properties::{
, fetch_stack = Some True
, fetch_about = Some True
}
)
, template = Some symbols.pulumi
}
, make_segment
segment::{
, type = "terraform"
, powerline_symbol = Some symbols.right_hard_inverse
, background = Some theme.iac-bg
, properties = Some
( make_properties
properties::{ fetch_version = Some True }
)
, template = Some symbols.terraform
}
, make_segment
segment::{
, type = "python"
, powerline_symbol = Some symbols.right_hard_inverse
, template = Some symbols.python
, background = Some theme.proglang-bg
}
, make_segment
segment::{
, type = "text"
, powerline_symbol = Some symbols.right_hard_inverse
, foreground = Some theme.direnv-fg
, template = Some
"{{if .Env.DIRENV_DIR}}${symbols.direnv}${symbols.right_soft}{{end}}"
}
, make_segment
segment::{
, type = "time"
, style = "diamond"
, leading_diamond = None Text
, trailing_diamond = Some
"<${theme.frame},transparent>${symbols.tright_frame}</>"
}
]
let transient =
{ template =
"<${theme.frame},transparent> ─</>"
++ "<${theme.fg},${theme.bg-alt}> "
++ "{{ .Segments.Time.CurrentDate | date .Segments.Time.Format }} </>"
++ "{{if gt .Segments.Status.Code 0}}"
++ "<${theme.bg-alt},${theme.red}>${symbols.left_hard}</>"
++ "<${theme.cyan},${theme.red}>"
++ "<${theme.red},transparent>${symbols.left_hard} </>"
++ "{{else}}"
++ "<${theme.bg-alt},${theme.green}>${symbols.left_hard}</>"
++ "<${theme.dark-blue},${theme.green}>"
++ "<${theme.green},transparent>${symbols.left_hard} </>{{end}}"
++ "<transparent,transparent> </>"
}
let tips =
[ make_segment
segment::{
, type = "git"
, style = "diamond"
, background = Some theme.vcs-bg
, properties = Some
( make_properties
properties::{
, fetch_status = Some True
, fetch_upstream_icon = Some True
}
)
, trailing_diamond = Some
( symbols.left_hard
++ "<${theme.frame},transparent>${symbols.bright_frame}</>"
)
}
/\ { tips = [ "git" ] }
, make_segment
segment::{
, type = "helm"
, style = "diamond"
, background = Some theme.k8s-bg
}
/\ { tips = [ "helm" ] }
, make_segment
segment::{
, type = "kubectl"
, style = "diamond"
, background = Some theme.k8s-bg
, template = Some
"${symbols.k8s} {{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}} "
, trailing_diamond = Some
( symbols.left_hard
++ "<${theme.frame},transparent>${symbols.bright_frame}</>"
)
}
/\ { tips = [ "kubectl", "helm" ] }
, make_segment
segment::{
, type = "gcp"
, background = Some theme.cloud-bg
, foreground = Some theme.cloud-fg
, style = "diamond"
, template = Some
"${symbols.gcp} {{.Project}} ({{.Account}}) "
, trailing_diamond = Some
( symbols.left_hard
++ "<${theme.frame},transparent>${symbols.bright_frame}</>"
)
}
/\ { tips = [ "gcloud" ] }
, make_segment
segment::{
, type = "az"
, style = "diamond"
, background = Some theme.cloud-bg
, foreground = Some theme.cloud-fg
, template = Some
"${symbols.az} {{.Name}} ({{.User.Name}}) "
, trailing_diamond = Some
( symbols.left_hard
++ "<${theme.frame},transparent>${symbols.bright_frame}</>"
)
}
/\ { tips = [ "az" ] }
, make_segment
segment::{
, type = "fossil"
, style = "diamond"
, background = Some theme.vcs-bg
, trailing_diamond = Some
( symbols.left_hard
++ "<${theme.frame},transparent>${symbols.bright_frame}</>"
)
}
/\ { tips = [ "fossil" ] }
, make_segment
segment::{
, type = "terraform"
, style = "diamond"
, background = Some theme.iac-bg
, properties = Some
( make_properties
properties::{ fetch_version = Some True }
)
, template = Some
( "${symbols.terraform} {{ .WorkspaceName }}"
++ "{{ if .Version }} {{ .Version }}{{ end }} "
)
, trailing_diamond = Some
( symbols.left_hard
++ "<${theme.frame},transparent>${symbols.bright_frame}</>"
)
}
/\ { tips = [ "tf", "terraform" ] }
, make_segment
segment::{
, type = "pulumi"
, style = "diamond"
, background = Some theme.iac-bg
, properties = Some
( make_properties
properties::{
, fetch_stack = Some True
, fetch_about = Some True
}
)
, template = Some
( "${symbols.pulumi} {{ .Stack }}"
++ "{{if .User }} :: {{ .User }}@{{ end }}"
++ "{{ if .URL }}{{ .URL }}{{ end }} "
)
, trailing_diamond = Some
( symbols.left_hard
++ "<${theme.frame},transparent>${symbols.bright_frame}</>"
)
}
/\ { tips = [ "pulumi" ] }
]
in { final_space = True
, shell_integration = True
, version = 2
, blocks =
[ make_block block::{ segments = l1segments }
, make_block block::{ alignment = "right", segments = rsegments }
, make_block block::{ segments = l2segments, newline = Some True }
, make_block block::{ segments = rpsegments, type = "rprompt" }
]
, transient_prompt = transient
, tooltips = tips
}
in prompt { segment = True }