# https://www.nerdfonts.com/font-downloads 下载安装 JetBrainsMono
"$schema" = 'https://starship.rs/config-schema.json'

add_newline = true

format = """
[╭─](bold blue) $os$directory$git_branch$git_status$c$cmake$rust$golang$nodejs$python$java$lua$docker_context
[╰─](bold blue)$character"""

right_format = "$cmd_duration$battery$time"

[character]
success_symbol = "[❯](bold green)"
error_symbol = "[❯](bold red)"
vimcmd_symbol = "[❮](bold green)"

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

[os.symbols]
Windows = " "
Ubuntu = " "
Macos = " "
Linux = " "

[directory]
style = "bold blue"
format = "[$path ]($style)[$read_only]($read_only_style)"
truncation_length = 4          # 稍作调整，更适合 Windows
truncate_to_repo = true
truncation_symbol = "…/"
read_only = " "

[git_branch]
symbol = " "
style = "bold purple"
format = "on [$symbol$branch]($style) "

[git_status]
style = "bold red"
format = '([\[$all_status$ahead_behind\]]($style) )'
conflicted = "🏳 "
ahead = "⇡${ahead_count} "
behind = "⇣${behind_count} "
diverged = "⇕⇡${ahead_count}⇣${behind_count} "
untracked = "🤷‍ "
stashed = "📦 "
modified = "📝 "
staged = "[++\\($count\\)](green) "
renamed = "✍️ "
deleted = "🗑 "

[cmd_duration]
min_time = 2000
format = "took [$duration]($style) "
style = "bold yellow"

[battery]
disabled = false
full_symbol = '󰁹 '
charging_symbol = '󰂄 '
discharging_symbol = '󰁾 '

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

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

# 编程语言图标（保持你原来的）
[python]
symbol = " "
style = "bold yellow"

[nodejs]
symbol = " "
style = "bold green"

[rust]
symbol = " "
style = "bold red"

[golang]
symbol = " "
style = "bold cyan"

[c]
symbol = " "
style = "bold blue"

[java]
symbol = " "
style = "bold red"

[docker_context]
symbol = " "
style = "bold blue"
