made the weird flake thing dynamic

This commit is contained in:
2026-04-01 20:22:42 +01:00
parent 59244870dc
commit 82b4a638e8

View File

@@ -17,23 +17,22 @@ final_space = true
alignment = 'left' alignment = 'left'
newline = true newline = true
[[blocks.segments]] [[blocks.segments]]
type = 'text' type = 'text'
style = 'plain' style = 'plain'
foreground = '#89dceb' # Nix Blue template = '''
template = '{{ if hasPrefix "flake-" .Env.name }}󱄅 flake <#7f849c>|</> {{ end }}' {{- if .Env.DEVSHELL_NAME -}}
{{- $parts := split "|" .Env.DEVSHELL_NAME -}}
[[blocks.segments]] # Rust nix shell {{- range $part := $parts -}}
type = 'text' {{- if $part -}}
style = 'plain' {{- $sub := split "/" $part -}}
foreground = 'red' {{- if eq (len $sub) 2 -}}
template = '{{ if contains "rustshell-env" .Env.name }}🦀 rustproject <#7f849c>|</> {{ end }}' <{{ index $sub "_1" }}>{{ index $sub "_0" }}</> <#7f849c>| </>
{{- end -}}
[[blocks.segments]] # Python venv {{- end -}}
type = 'text' {{- end -}}
style = 'plain' {{- end -}}
foreground = 'yellow' '''
template = '{{ if .Env.VIRTUAL_ENV }}🐍 venv <grey>|</> {{ end }}'
[[blocks.segments]] [[blocks.segments]]
template = '{{ .Path }}' template = '{{ .Path }}'