Skip to content

Commit c7c73ff

Browse files
committed
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.
1 parent 8d9022c commit c7c73ff

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

.devcontainer/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# CodeForge Devcontainer Changelog
22

3+
## [Unreleased]
4+
5+
### Changed
6+
7+
#### Status Bar
8+
- **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
9+
10+
### Added
11+
12+
#### Docs
13+
- **CLAUDE.md** — new "Status Bar Widgets" section documenting widget properties, token color conventions, label fusion pattern, and available widget types
14+
315
## [v1.14.2] - 2026-02-24
416

517
### Fixed

.devcontainer/CLAUDE.md

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

95136
## Features
96137

0 commit comments

Comments
 (0)