# ------------------------------------------------------------------------------
# jimeh's Starship Config
# ------------------------------------------------------------------------------
# Version: 0.4.0
# URL: https://github.com/jimeh/dotfiles/blob/main/config/starship.toml
# ------------------------------------------------------------------------------
# This is minimalistic Starship (https://starship.rs/) prompt setup with most
# features shifted to the right prompt, and disabled, allowing for easy cherry
# picking of specific features to enable.
# ------------------------------------------------------------------------------

add_newline = false
format = """
$username\
$hostname\
$directory\
$git_branch\
$git_commit\
$git_state\
$git_metrics\
$git_status\
$hg_branch\
$line_break\
$character"""
right_format = """
$localip\
$shlvl\
$singularity\
$kubernetes\
$vcsh\
$fossil_branch\
$pijul_channel\
$docker_context\
$package\
$c\
$cmake\
$cobol\
$daml\
$dart\
$deno\
$dotnet\
$elixir\
$elm\
$erlang\
$fennel\
$gleam\
$golang\
$guix_shell\
$haskell\
$haxe\
$java\
$julia\
$kotlin\
$gradle\
$lua\
$nim\
$nodejs\
$bun\
$ocaml\
$opa\
$perl\
$php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
$rust\
$scala\
$swift\
$terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$aws\
$gcloud\
$helm\
$openstack\
$azure\
$env_var\
$crystal\
$custom\
$cmd_duration\
$status\
$line_break\
$direnv
$jobs\
$shell\
$sudo\
$battery\
$memory_usage\
$os\
$container\
$time"""

# ------------------------------------------------------------------------------
# Main left prompt components
# ------------------------------------------------------------------------------

[username]
show_always = true
format = '[$user]($style)'
style_user = 'fg:251'
style_root = 'bold fg:196 bg:52'

[hostname]
ssh_only = false
format = '([@$hostname]($style) )'
style = 'fg:251'

[directory]
truncate_to_repo = false
truncation_length = 99
format = '[$path]($style)[$read_only]($read_only_style) '
style = ''
read_only = ''
read_only_style = 'bold red'

[line_break]
disabled = true

[character]
success_symbol = '[❯](bold fg:118)'
error_symbol = '[❯](bold fg:46)'
vicmd_symbol = '[❮](bold fg:46)'

# ------------------------------------------------------------------------------
# Source Control
# ------------------------------------------------------------------------------
#
[git_branch]
format = '([$symbol$branch]($style))'
style = 'fg:51'
symbol = ''
truncation_length = 24

[git_commit]
tag_symbol = ''
format = '[\($hash$tag\)]($style)'
style = 'bold fg:213'
only_detached = true
tag_disabled = false

[git_state]
format = '\[[$state($progress_current/$progress_total)]($style)\]'
style = 'bold fg:208'

[git_metrics]
added_style = 'bold fg:148'
deleted_style = 'bold fg:196'
format = '([\[](fg:51)([+$added]($added_style))([-$deleted]($deleted_style))[\]](fg:51))'
disabled = true

[git_status]
format = '([$all_status$ahead_behind]($style)) '
style = 'bold fg:201'
stashed = ''
ahead = ""
behind = ''
modified = '!'
untracked = '?'
diverged = ''
deleted = '✖'

[hg_branch]
format = '([$symbol$branch]($style))'
style = 'fg:51'
symbol = ''
truncation_length = 24

# ------------------------------------------------------------------------------
# Right prompt "status" components
# ------------------------------------------------------------------------------
#
[shlvl]
symbol = ' '
format = '( [$symbol$shlvl]($style))'
disabled = true

[cmd_duration]
format = '( [\(](fg:242)[$duration]($style)[\)](fg:242))'
style = 'bold fg:220'

[sudo]
symbol = ' '
format = '[$symbol]($style)'
style = 'bold dimmed red'
disabled = false

[status]
symbol = ''
success_symbol = ''
not_executable_symbol = ''
not_found_symbol = ''
sigint_symbol = ''
signal_symbol = '󱐋'
format = '( [$symbol$status]($style))'
style = 'bold red'
disabled = false

[jobs]
symbol = '✦'
format = '( [$symbol$number]($style))'
style = 'bold blue'
symbol_threshold = 1
number_threshold = 1
disabled = false

[shell]
bash_indicator = ' bsh'
fish_indicator = ' fsh'
zsh_indicator = ' zsh'
powershell_indicator = ' psh'
ion_indicator = " ion"
elvish_indicator = ' esh'
tcsh_indicator = ' tsh'
xonsh_indicator = ' xsh'
cmd_indicator = ' cmd'
nu_indicator = ' nu'
format = '[$indicator]($style)'
disabled = true

[localip]
format = '( @[$localipv4](bold red))'
disabled = true

[os]
format = '( [$symbol]($style))'
disabled = true

[battery]
format = '( [$symbol$percentage]($style))'

[[battery.display]]
threshold = 10
style = 'bold red'

[memory_usage]
threshold = 75
symbol = '󰍛 '
format = '( [$symbol${ram}]($style))'
disabled = true

[time]
format = '( [\[](fg:237)[$time]($style)[\]](fg:237))'
style = "bold fg:239"
disabled = false

# ------------------------------------------------------------------------------
# Languages
# ------------------------------------------------------------------------------
#
[buf]
symbol = ' '
format = '( [$symbol($version)]($style))'
disabled = false

[bun]
format = '( [$symbol$version]($style))'
disabled = false

[c]
format = '( [$symbol($version(-$name))]($style))'
disabled = true

[cmake]
format = '( [$symbol$version]($style))'
disabled = true

[cobol]
symbol = '󰒓 '
format = '( [$symbol$version]($style))'
disabled = true

[crystal]
format = '( [$symbol$version]($style))'
disabled = false

[daml]
format = '( [$symbol($version)]($style))'
disabled = true

[dart]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = false

[deno]
format = '( [$symbol$version]($style))'
disabled = true

[dotnet]
symbol = '󰪮 '
format = '( [$symbol($version)( 🎯 $tfm)]($style))'
disabled = false

[elixir]
symbol = ' '
format = '( [$symbol($version \(OTP $otp_version\))]($style))'
disabled = false

[elm]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = true

[erlang]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = true

[fennel]
format = '( [$symbol($version)]($style))'
disabled = true

[gleam]
format = '( [$symbol($version)]($style))'
disabled = false

[golang]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = false

[guix_shell]
format = '( [$symbol]($style))'
disabled = true

[haskell]
format = '( [$symbol($version)]($style))'
disabled = false

[haxe]
format = '( [$symbol($version)]($style))'
disabled = true

[java]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = true

[julia]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = true

[kotlin]
format = '( [$symbol$version]($style))'
disabled = true

[lua]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = false

[nim]
symbol = '󰆥 '
format = '( [$symbol$version]($style))'
disabled = true

[nodejs]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = false

[ocaml]
format = '( [$symbol$version(\($switch_indicator$switch_name\))]($style))'
disabled = true

[perl]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = true

[php]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = false

[purescript]
format = '( [$symbol$version]($style))'
disabled = true

[python]
symbol = ' '
format = '( [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style))'
disabled = true

[raku]
format = '( [$symbol($version-$vm_version)]($style))'
disabled = true

[rlang]
format = '( [$symbol$version]($style))'
disabled = true

[red]
format = '( [$symbol$version]($style))'
disabled = true

[ruby]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = false

[rust]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = false

[scala]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = true

[swift]
symbol = ' '
format = '( [$symbol$version]($style))'
disabled = false

[vlang]
format = '( [$symbol$version]($style))'
disabled = true

[zig]
format = '( [$symbol$version]($style))'
disabled = false

# ------------------------------------------------------------------------------
# Tools
# ------------------------------------------------------------------------------
#
[aws]
symbol = ' '
format = '( [$symbol($profile)( \($region\))( \[$duration\])]($style))'
disabled = true

[azure]
symbol = '󰠅 '
format = '( [$symbol($subscription)]($style))'
disabled = true

[conda]
symbol = ' '
format = '( [$symbol$environment]($style))'

[container]
format = '( [$symbol \[$name\]]($style))'
disabled = false

[direnv]
symbol = ' '
format = '( [$symbol]($style)[(($loaded/)$allowed)](red))'
allowed_msg = ''
denied_msg = 'denied'
loaded_msg = ''
not_allowed_msg = 'not allowed'
unloaded_msg = ''
disabled = false
style = 'bold green'

[docker_context]
symbol = ' '
format = '( [$symbol$context]($style))'
disabled = true

[env_var]
format = '( with [$env_value]($style))'
disabled = true

[fossil_branch]
format = '( [$symbol$branch]($style))'
disabled = true

[gcloud]
symbol = ' '
format = '( [$symbol$account(@$domain)(\($region\))]($style))'
disabled = true

[gradle]
fomat = '( [$symbol($version)]($style))'
disabled = true

[helm]
format = '( [$symbol$version]($style))'
disabled = false

[kubernetes]
symbol = '☸ '
format = '( [$symbol$context(\($namespace\))]($style))'
disabled = false

[meson]
format = '( [$symbol$project]($style))'
disabled = true

[nix_shell]
symbol = ' '
format = '( [$symbol$state(\($name\))]($style))'
disabled = false

[opa]
format = '( [$symbol($version)]($style))'
disabled = true

[openstack]
symbol = ' '
format = '( [$symbol$cloud(\($project\))]($style))'
disabled = true

[package]
symbol = '󰏗 '
format = '( [$symbol$version]($style))'
disabled = true

[pijul_channel]
format = '( [$symbol$channel]($style))'
disabled = true

[pulumi]
format = '( [$symbol$stack]($style))'
disabled = true

[singularity]
format = '( [$symbol\[$env\]]($style))'
disabled = true

[spack]
format = '( [$symbol$environment]($style))'
disabled = true

[terraform]
format = '( [$symbol$workspace]($style))'
disabled = false

[vagrant]
format = '( [$symbol($version)]($style))'
disabled = false

[vcsh]
format = '(vcsh [$symbol$repo]($style))'
disabled = true
