"$schema" = 'https://starship.rs/config-schema.json'
command_timeout = 1000
add_newline = true

# ── violet-chaton v2 — palette reference ─────────────────────────────────────
#  magenta   #ff4da6   accent primaire
#  lilac     #c9a0ff   accent secondaire
#  mitsuri   #9adba8   vert pastel (success, fresh)
#  lavande   #a4b4ff   bleu-violet (info, fonctions)
#  champagne #e8c87a   or chaud (warning, langages)
#  danger    #f25c7a   rouge vif
#  text      #f0eaf8   texte principal
#  subtext1  #c4b8d4   texte secondaire
#  subtext0  #9a8fad   labels
#  muted     #716686   desactive
#  surface2  #5a3875   selection

# ── Format — 3 lignes ───────────────────────────────────────────────────────
# Ligne 1 : separateur
# Ligne 2 : os | dir | git | langages | ... fill ... | duree | batterie | heure
# Ligne 3 : prompt caractere
format = """
[┌──](bold #5a3875) $os$sudo$username$hostname\
$directory$git_branch$git_status$git_state$git_commit\
$python$nodejs$rust$golang$java$docker_context$package$env_var\
$fill\
$cmd_duration$battery$time
[└─](bold #5a3875) $status$character"""

# ── Palette Starship ─────────────────────────────────────────────────────────
palette = "violet-chaton"

[palettes.violet-chaton]
magenta   = "#ff4da6"
lilac     = "#c9a0ff"
mitsuri   = "#9adba8"
lavande   = "#a4b4ff"
champagne = "#e8c87a"
danger    = "#f25c7a"
text      = "#f0eaf8"
subtext1  = "#c4b8d4"
subtext0  = "#9a8fad"
muted     = "#716686"
surface2  = "#5a3875"
crust     = "#1a0e27"

# ── Systeme ──────────────────────────────────────────────────────────────────

[os]
disabled = false
style = "bold magenta"
format = "[$symbol]($style)"

[os.symbols]
Pop        = " "
Ubuntu     = " "
Debian     = " "
Arch       = " "
Fedora     = " "
Kali       = " "
Manjaro    = " "
Mint       = " "
NixOS      = " "
openSUSE   = " "
Raspbian   = " "
Redhat     = " "
RedHatEnterprise = " "
RockyLinux = " "
AlmaLinux  = " "
CentOS     = " "
Alpine     = " "
Android    = " "
FreeBSD    = " "
Macos      = " "
Windows    = "󰍲 "
Unknown    = " "

[sudo]
disabled = false
style    = "bold danger"
symbol   = "󰞀 "
format   = "[$symbol]($style)"

[username]
style_user  = "subtext0"
style_root  = "bold danger"
format      = "[$user]($style)"
show_always = false

[hostname]
style      = "muted"
format     = "[@$hostname ]($style)"
ssh_only   = true
ssh_symbol = "󰣀 "

# ── Navigation ───────────────────────────────────────────────────────────────

[directory]
style              = "bold lilac"
read_only          = " 󰌾"
read_only_style    = "danger"
truncate_to_repo   = false
truncation_length  = 4
truncation_symbol  = "…/"
format             = "[ $path]($style)[$read_only]($read_only_style) "

# ── Git ──────────────────────────────────────────────────────────────────────

[git_branch]
symbol = " "
style  = "bold magenta"
format = "[$symbol$branch]($style) "

[git_status]
style    = "mitsuri"
format   = "([$all_status$ahead_behind]($style) )"
ahead    = "⇡$count"
behind   = "⇣$count"
diverged = "⇕⇡$ahead_count⇣$behind_count"
untracked = "?$count"
stashed  = "󰏗 $count"
modified = "!$count"
staged   = "+$count"
renamed  = "»$count"
deleted  = "✘$count"
conflicted = "=$count"

[git_state]
style  = "champagne"
format = '\([$state( $progress_current/$progress_total)]($style)\) '

[git_commit]
style      = "muted"
format     = '[\($hash$tag\)]($style) '
tag_symbol = " 󰓼 "
only_detached = true

# ── Langages ─────────────────────────────────────────────────────────────────

[python]
symbol = " "
style  = "champagne"
format = "[$symbol$version]($style) "

[nodejs]
symbol = " "
style  = "mitsuri"
format = "[$symbol$version]($style) "

[rust]
symbol = " "
style  = "magenta"
format = "[$symbol$version]($style) "

[golang]
symbol = " "
style  = "lavande"
format = "[$symbol$version]($style) "

[java]
symbol = " "
style  = "danger"
format = "[$symbol$version]($style) "

[docker_context]
symbol        = " "
style         = "lavande"
format        = "[$symbol$context]($style) "
only_with_files = true

[package]
symbol = "󰏗 "
style  = "lilac"
format = "[$symbol$version]($style) "
display_private = false

# ── Env var custom — brain_name ──────────────────────────────────────────────
[env_var.brain_name]
variable = "brain_name"
style    = "italic muted"
symbol   = "󰧑 "
format   = "[$symbol$env_value]($style) "

# ── Droite (apres $fill) ────────────────────────────────────────────────────

[fill]
symbol = "─"
style  = "#3d2454"

[cmd_duration]
format   = "[󱎫 $duration]($style) "
style    = "subtext0"
min_time = 2000

[battery]
disabled = false
format   = "[$symbol$percentage]($style) "

[[battery.display]]
threshold = 30
style     = "bold danger"

[[battery.display]]
threshold = 70
style     = "champagne"

[time]
disabled     = false
style        = "bold muted"
format       = "[ $time]($style)"
time_format  = "%H:%M"

# ── Ligne 3 — le prompt ─────────────────────────────────────────────────────

[status]
disabled = false
style    = "danger"
format   = "[$symbol$status ]($style)"
symbol   = "✘ "

[character]
success_symbol = "[❯](bold mitsuri)"
error_symbol   = "[❯](bold magenta)"
