Feature: colour usage bars by level (thresholds per widget)
Feature request: colour a usage bar by its level (thresholds)
Today every widget renders in one fixed color. For the quota widgets (session-usage, weekly-usage, weekly-opus-usage, fable-weekly-usage, context-bar) the number that matters is how full the bar is, and a fixed colour cannot say that: with a calm palette a 20 percent bar and a 92 percent bar look identical except for the fill; with a warm palette every bar looks like a warning all day.
Proposal: optional per-widget thresholds that pick the colour by the current percentage.
{
"type": "weekly-usage",
"color": "hex:88C0D0",
"metadata": {
"display": "slider",
"levels": [
{ "from": 0, "color": "hex:88C0D0" },
{ "from": 70, "color": "hex:EBCB8B" },
{ "from": 90, "color": "hex:BF616A" }
]
}
}levelsis optional; when absent, behaviour is unchanged.- The last matching
fromwins; the colour applies to the bar, its percentage text and any merged label. - Same shape would work for
context-percentage/context-bar(where "used" is the level) and forblock-timer(time remaining inverted).
Editor support could be a "Levels" sub-menu on those widgets, but the JSON field alone would already cover scripted setups.
Happy to test a build. Thanks for the tool, the slider widgets and the merge flag are what make a two-line layout readable.
Source: sirmalloc/ccstatusline