StarShip配置
个人简单的Starship配置
# ~/.config/starship.toml
# 启用浅色/柔和调色板
palette = "pastel_light"
# 1. 整体格式:两行式布局
format = """
$os$directory$git_branch$git_status$cmd_duration$fill$time
$character"""
# 2. 第二行极简,仅一个 ">" 字符
[character]
success_symbol = "[❯](bold color_blue)"
error_symbol = "[❯](bold color_red)"
vimcmd_symbol = "[❮](bold mustard)"
# 3. 操作系统图标 (Arch Linux)
[os]
disabled = false
format = "[$symbol ]($style)"
style = "bold color_blue"
[os.symbols]
Arch = ""
Windows = ""
Ubuntu = ""
Mint = ""
Macos = ""
Manjaro = ""
Linux = ""
Fedora = ""
Alpine = ""
Android = ""
Artix = ""
EndeavourOS = ""
CentOS = ""
Debian = ""
Redhat = ""
# --- 基础组件配置 ---
[directory]
style = "bold color_blue"
format = "[ $path ]($style)"
truncation_length = 3 # 超过 3 层时触发缩写
fish_style_pwd_dir_length = 1 # 触发后,将中间的目录缩写为 1 个字母
truncate_to_repo = false
[git_branch]
symbol = ""
style = "bold color_purple"
format = "[ $symbol $branch ]($style)"
[git_status]
format = '([$all_status$ahead_behind]($style) )'
style = "bold color_red"
untracked = ""
stashed = ""
modified = ""
staged = ""
renamed = ""
deleted = ""
conflicted = "="
ahead = "⇡"
behind = "⇣"
diverged = "⇕"
# --- 柔和浅色调色板 (Pastel Colors) ---
[palettes.pastel_light]
mustard = '#f9e2af' # 柔和芥末黄
color_orange = '#fab387' # 浅橘色 (Java)
color_fg0 = '#4c4f69' # 深灰文字色 (备用)
color_fg1 = '#919be6' # 次级文字色 (备用)
color_purple = '#5fafa2' # 浅紫色 (Git 分支)
color_bg3 = '#ccd0da' # 浅灰背景 (备用)
color_green = '#a6e3a1' # 浅绿色 (Nodejs, 成功提示符)
color_bg1 = '#e6e9ef' # 次级背景 (备用)
color_blue = '#89b4fa' # 浅蓝色 (目录, C/C++, OS)
color_red = '#f38ba8' # 浅红色 (Rust, Git 状态, 错误提示符)
color_aqua = '#94e2d5' # 浅青色 (Golang)
color_yellow = '#f9e2af' # 浅黄色 (Python)
[cmd_duration]
min_time = 2000 # 超过 2000 毫秒 (2秒) 的命令才会显示
format = "[took $duration ](bold color_fg1)"
[time]
disabled = false
time_format = "%R"
style = "color_fg1"
format = "[ $time ]($style)"
# 5. 填充模块:用于将时间推向右侧
[fill]
symbol = " " 预备条件
安装Starship
安装任意NF字体