feat: complete Rust port of claude-statusline
Port the entire 2236-line bash statusline script to Rust. Implements all 25 sections, 3-phase layout engine (render, priority drop, flex/justify), file-based caching with flock, 9-level terminal width detection, trend sparklines, and deep-merge JSON config. Release binary: 864K with LTO. Render time: <1ms warm. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
31
examples/custom-commands.json
Normal file
31
examples/custom-commands.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"version": 1,
|
||||
|
||||
"layout": [
|
||||
["model", "provider", "project", "vcs"],
|
||||
["context_bar", "cost", "duration", "ollama", "docker"]
|
||||
],
|
||||
|
||||
"custom": [
|
||||
{
|
||||
"id": "ollama",
|
||||
"label": "ollama",
|
||||
"command": "pgrep -x ollama >/dev/null && echo 'up' || echo 'down'",
|
||||
"ttl": 30,
|
||||
"priority": 3,
|
||||
"color": {
|
||||
"match": { "up": "green", "down": "dim" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "docker",
|
||||
"label": "docker",
|
||||
"command": "docker info >/dev/null 2>&1 && echo 'up' || echo 'down'",
|
||||
"ttl": 60,
|
||||
"priority": 3,
|
||||
"color": {
|
||||
"match": { "up": "green", "down": "dim" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user