feat: add portable Claude Code statusline kit

Replicating the cship-based statusline across machines meant manually
copying three files and hand-editing settings.json with per-user absolute
paths — error-prone and slow. Bundling the assets with an idempotent
installer that resolves the pwsh path at runtime and merges into an
existing settings.json makes rollout a single command per PC.
This commit is contained in:
Andre
2026-07-18 15:48:14 +02:00
commit 79342c73da
6 changed files with 314 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
# cship — Claude Code statusline (Hero / Recommended + usage progress bars)
# Reference: https://cship.dev
[cship]
lines = [
"$starship_prompt",
"$cship.model $cship.effort $cship.context_window.total_input_tokens $cship.context_bar $cship.peak_usage $cship.usage_limits",
]
[cship.model]
symbol = "🤖 "
style = "bold cyan"
[cship.effort]
symbol = "⚡ "
style = "fg:#7dcfff"
high_style = "fg:#e0af68"
xhigh_style = "bold fg:#e0af68"
max_style = "bold fg:#f7768e"
[cship.context_bar]
symbol = "🧠 "
filled_char = "█"
empty_char = "░"
format = "[$symbol$value]($style)"
width = 10
style = "fg:#7dcfff"
warn_threshold = 40.0
warn_style = "yellow"
critical_threshold = 70.0
critical_style = "bold red"
# $value is emitted inside a §T§…§ marker so the statusline wrapper can
# compact the raw token count (e.g. 42329 → 42.3K) before display.
[cship.context_window.total_input_tokens]
symbol = "🔢 "
style = "fg:#a9b1d6"
format = "[$symbol§T§$value§]($style)"
# usage_limits emits machine markers (§TYPE§pct§reset§); the statusline wrapper
# turns them into progress bars styled like context_bar. Thresholds >100 so cship
# adds no ANSI of its own around the markers.
[cship.usage_limits]
style = ""
separator = " "
five_hour_format = "§5§{pct}§{reset}§"
seven_day_format = "§7§{pct}§{reset}§"
warn_threshold = 101
critical_threshold = 101
[cship.peak_usage]
symbol = "⏰ "
style = "fg:#e0af68"