# Inserts a blank line between shell prompts
add_newline = false

format = '''${custom.color}╭──\(${custom.bold}$username@$hostname${custom.color}\)-\[$directory${custom.color}(\]-\[$git_branch$git_metrics$git_status)${custom.color}\]( $nix_shell) $cmd_duration
${custom.color}╰─$shell '''

right_format = '$status'

[custom.color]
command = '''
accent="$(cat ~/.config/colors/accent)"
case "$accent" in
    black)
        code=30
        ;;
    red)
        code=31
        ;;
    green)
        code=32
        ;;
    yellow)
        code=33
        ;;
    blue)
        code=34
        ;;
    purple)
        code=35
        ;;
    cyan)
        code=36
        ;;
    *)
        code=0
        ;;
esac

printf "\\033[0;${code}m"
'''
when = true
format = "$output"

[custom.bold]
command = '''
printf "\\033[1m"
'''
when = true
unsafe_no_escape = true
format = "$output"

[line_break]
disabled = false

[username]
format = '$user'
disabled = false
show_always = true

[nix_shell]
symbol = '❄️'
format = '[$symbol $name](bold purple)'

[hostname]
ssh_only = false
format = '[$ssh_symbol](bold blue)$hostname'
trim_at = '.companyname.com'
disabled = false

[git_branch]
symbol = ''
format = '[$symbol$branch](bold green)'

[git_status]
modified = '[✘](bold red)'
up_to_date = 'up'
format = '$up_to_date$modified$up_to_date'

[directory]
truncation_length = 3
truncation_symbol = '…/'
truncate_to_repo = true
style = 'bold white'
format = '[$path]($style)[$read_only]($read_only_style)'

[cmd_duration]
min_time = 1_000
style = "bold dimmed yellow"
format = '◷[$duration]($style) '

[shell]
fish_indicator =       '󰈺'
powershell_indicator = '_'
bash_indicator =      '\$'
zsh_indicator =        'λ'
unknown_indicator =    '?'
disabled = false
format = '[$indicator](bold)'

[status]
disabled = false

