Skip to content

Commit 873bb71

Browse files
authored
Fix ccstatusline line 1 styling and readability (#9)
* Fix ccstatusline line 1: distinct token colors, identifiers, spacing - Add rawValue to model widget to strip "Model:" prefix - Replace merge: no-padding with normal spacing between token widgets - Give each token widget a distinct background (blue, magenta, yellow, green) - Add bold 2-char custom-text labels (In, Ou, Ca, Tt) fused to each token widget * Document ccstatusline widget conventions in CLAUDE.md Resolves CodeRabbit review: config-system changes require matching documentation. Adds Status Bar Widgets section covering widget properties, token color conventions, label fusion pattern, and available widget types. Adds changelog entry for the styling changes and documentation update. --------- Co-authored-by: AnExiledDev <AnExiledDev@users.noreply.github.com>
1 parent 187236f commit 873bb71

File tree

3 files changed

+96
-7
lines changed

3 files changed

+96
-7
lines changed

.devcontainer/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
## [Unreleased]
44

5+
### Added
6+
7+
#### Docs
8+
- **CLAUDE.md** — new "Status Bar Widgets" section documenting widget properties, token color conventions, label fusion pattern, and available widget types
9+
10+
### Changed
11+
12+
#### Status Bar
13+
- **ccstatusline line 1** — distinct background colors for each token widget (blue=input, magenta=output, yellow=cached, green=total), bold 2-char labels (In, Ou, Ca, Tt) fused to data widgets, `rawValue: true` on model widget to strip "Model:" prefix, restored spacing between token segments
14+
515
### Fixed
616

717
#### Plugin Marketplace

.devcontainer/CLAUDE.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,48 @@ All experimental feature flags are in `settings.json` under `env`. Setup steps c
9292
4. **Add features**: Add to `"features"` in `devcontainer.json`
9393
5. **Disable features**: Set `"version": "none"` in the feature's config
9494
6. **Disable setup steps**: Set flags to `false` in `.env`
95-
7. **Customize status bar**: Edit `config/defaults/ccstatusline-settings.json`
95+
7. **Customize status bar**: Edit `config/defaults/ccstatusline-settings.json` (see below)
96+
97+
## Status Bar Widgets
98+
99+
The status bar is configured in `config/defaults/ccstatusline-settings.json` (deploys to `~/.config/ccstatusline/settings.json`). Each widget is a JSON object in a line array.
100+
101+
### Widget Properties
102+
103+
| Property | Purpose |
104+
|----------|---------|
105+
| `id` | Unique identifier (UUID or descriptive string) |
106+
| `type` | Widget type (see below) |
107+
| `backgroundColor` | Background color: `bgBlue`, `bgMagenta`, `bgYellow`, `bgGreen`, `bgRed`, etc. |
108+
| `color` | Text color: `brightWhite`, `black`, `cyan`, `yellow`, etc. |
109+
| `rawValue` | `true` to strip type-specific prefixes (e.g., removes "Model:" from model widget) |
110+
| `bold` | `true` for bold text |
111+
| `merge` | `"no-padding"` fuses this widget to the next (no separator/space between them) |
112+
| `customText` | Static text content (only for `custom-text` type) |
113+
114+
### Token Widgets
115+
116+
Each token metric uses a distinct background color for at-a-glance identification:
117+
118+
| Type | Color | Label |
119+
|------|-------|-------|
120+
| `tokens-input` | Blue (`bgBlue`) | **In** |
121+
| `tokens-output` | Magenta (`bgMagenta`) | **Ou** |
122+
| `tokens-cached` | Yellow (`bgYellow`) | **Ca** |
123+
| `tokens-total` | Green (`bgGreen`) | **Tt** |
124+
125+
Labels are `custom-text` widgets with `merge: "no-padding"` so they fuse visually to their data widget:
126+
127+
```json
128+
{ "id": "lbl-tokens-input", "type": "custom-text", "customText": "In",
129+
"backgroundColor": "bgBlue", "color": "brightWhite", "bold": true, "merge": "no-padding" },
130+
{ "id": "5", "type": "tokens-input",
131+
"backgroundColor": "bgBlue", "color": "brightWhite", "rawValue": true }
132+
```
133+
134+
### Other Widget Types
135+
136+
`model`, `context-length`, `context-percentage-usable`, `git-branch`, `git-changes`, `git-worktree`, `session-clock`, `session-cost`, `block-timer`, `version`, `custom-command`
96137

97138
## Features
98139

.devcontainer/config/defaults/ccstatusline-settings.json

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
{
66
"id": "d904cca6-ade8-41c1-a4f5-ddea30607a5e",
77
"type": "model",
8-
"backgroundColor": "bgMagenta"
8+
"backgroundColor": "bgMagenta",
9+
"rawValue": true
910
},
1011
{
1112
"id": "1",
@@ -19,31 +20,68 @@
1920
"backgroundColor": "bgRed",
2021
"rawValue": true
2122
},
23+
{
24+
"id": "lbl-tokens-input",
25+
"type": "custom-text",
26+
"customText": "In",
27+
"backgroundColor": "bgBlue",
28+
"color": "brightWhite",
29+
"bold": true,
30+
"merge": "no-padding"
31+
},
2232
{
2333
"id": "5",
2434
"type": "tokens-input",
25-
"color": "magenta",
26-
"rawValue": true,
35+
"backgroundColor": "bgBlue",
36+
"color": "brightWhite",
37+
"rawValue": true
38+
},
39+
{
40+
"id": "lbl-tokens-output",
41+
"type": "custom-text",
42+
"customText": "Ou",
43+
"backgroundColor": "bgMagenta",
44+
"color": "brightWhite",
45+
"bold": true,
2746
"merge": "no-padding"
2847
},
2948
{
3049
"id": "ac094d46-3673-4d41-84e3-dc8c5bcf639f",
3150
"type": "tokens-output",
3251
"backgroundColor": "bgMagenta",
33-
"rawValue": true,
52+
"color": "brightWhite",
53+
"rawValue": true
54+
},
55+
{
56+
"id": "lbl-tokens-cached",
57+
"type": "custom-text",
58+
"customText": "Ca",
59+
"backgroundColor": "bgYellow",
60+
"color": "black",
61+
"bold": true,
3462
"merge": "no-padding"
3563
},
3664
{
3765
"id": "2ad12147-05fd-45fb-8336-53ba2e7df56c",
3866
"type": "tokens-cached",
39-
"backgroundColor": "bgBrightRed",
40-
"rawValue": true,
67+
"backgroundColor": "bgYellow",
68+
"color": "black",
69+
"rawValue": true
70+
},
71+
{
72+
"id": "lbl-tokens-total",
73+
"type": "custom-text",
74+
"customText": "Tt",
75+
"backgroundColor": "bgGreen",
76+
"color": "black",
77+
"bold": true,
4178
"merge": "no-padding"
4279
},
4380
{
4481
"id": "9bacbdb4-2e01-45de-a0c0-ee6ec30fa3c2",
4582
"type": "tokens-total",
4683
"backgroundColor": "bgGreen",
84+
"color": "black",
4785
"rawValue": true
4886
}
4987
],

0 commit comments

Comments
 (0)