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>
32 lines
660 B
JSON
32 lines
660 B
JSON
{
|
|
"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" }
|
|
}
|
|
}
|
|
]
|
|
}
|