made the weird flake thing dynamic
This commit is contained in:
@@ -20,20 +20,19 @@ final_space = true
|
||||
[[blocks.segments]]
|
||||
type = 'text'
|
||||
style = 'plain'
|
||||
foreground = '#89dceb' # Nix Blue
|
||||
template = '{{ if hasPrefix "flake-" .Env.name }} flake <#7f849c>|</> {{ end }}'
|
||||
|
||||
[[blocks.segments]] # Rust nix shell
|
||||
type = 'text'
|
||||
style = 'plain'
|
||||
foreground = 'red'
|
||||
template = '{{ if contains "rustshell-env" .Env.name }}🦀 rustproject <#7f849c>|</> {{ end }}'
|
||||
|
||||
[[blocks.segments]] # Python venv
|
||||
type = 'text'
|
||||
style = 'plain'
|
||||
foreground = 'yellow'
|
||||
template = '{{ if .Env.VIRTUAL_ENV }}🐍 venv <grey>|</> {{ end }}'
|
||||
template = '''
|
||||
{{- if .Env.DEVSHELL_NAME -}}
|
||||
{{- $parts := split "|" .Env.DEVSHELL_NAME -}}
|
||||
{{- range $part := $parts -}}
|
||||
{{- if $part -}}
|
||||
{{- $sub := split "/" $part -}}
|
||||
{{- if eq (len $sub) 2 -}}
|
||||
<{{ index $sub "_1" }}>{{ index $sub "_0" }}</> <#7f849c>| </>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
'''
|
||||
|
||||
[[blocks.segments]]
|
||||
template = '{{ .Path }}'
|
||||
|
||||
Reference in New Issue
Block a user