@promptctl/cc-candybar 1.98.0 → 1.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.mjs +48 -48
- package/package.json +5 -5
- package/plugin/bin/preview.sh +15 -15
- package/plugin/commands/candybar.md +15 -15
- package/plugin/templates/config.json +1 -1
- package/schema/cc-candybar.schema.json +19 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptctl/cc-candybar",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.99.0",
|
|
4
4
|
"description": "Statusline renderer for Claude Code — a JSON5-configurable DSL with daemon-cached data sources, byte-clean palette-aware composition, and OSC8 click verbs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
"mobx": "^6.15.0"
|
|
92
92
|
},
|
|
93
93
|
"optionalDependencies": {
|
|
94
|
-
"@promptctl/cc-candybar-darwin-arm64": "1.
|
|
95
|
-
"@promptctl/cc-candybar-darwin-x64": "1.
|
|
96
|
-
"@promptctl/cc-candybar-linux-x64": "1.
|
|
97
|
-
"@promptctl/cc-candybar-linux-arm64": "1.
|
|
94
|
+
"@promptctl/cc-candybar-darwin-arm64": "1.99.0",
|
|
95
|
+
"@promptctl/cc-candybar-darwin-x64": "1.99.0",
|
|
96
|
+
"@promptctl/cc-candybar-linux-x64": "1.99.0",
|
|
97
|
+
"@promptctl/cc-candybar-linux-arm64": "1.99.0"
|
|
98
98
|
}
|
|
99
99
|
}
|
package/plugin/bin/preview.sh
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Render the wizard's template config against a fixture session so the user can
|
|
3
|
-
# see a real bar before committing to a theme,
|
|
3
|
+
# see a real bar before committing to a theme, endcaps shape, charset, or preset.
|
|
4
4
|
#
|
|
5
5
|
# The config rendered here IS the template the wizard writes — templates/config.json
|
|
6
6
|
# with its four placeholders filled by the same substitution the wizard performs —
|
|
@@ -17,12 +17,12 @@ readonly TEMPLATE="${PLUGIN_ROOT}/templates/config.json"
|
|
|
17
17
|
# The options the wizard offers, one list per template placeholder. Each name
|
|
18
18
|
# must be one the daemon accepts; the test pins that against the real domains.
|
|
19
19
|
readonly THEMES=(textual-dark textual-light nord tokyo-night rose-pine gruvbox catppuccin-mocha dracula solarized-dark monokai)
|
|
20
|
-
readonly
|
|
20
|
+
readonly ENDCAPS_SHAPES=(powerline capsule plain)
|
|
21
21
|
readonly CHARSETS=(unicode ascii)
|
|
22
22
|
readonly PRESETS=(default compact verbose zen git usage dense)
|
|
23
23
|
|
|
24
24
|
THEME="${THEMES[0]}"
|
|
25
|
-
|
|
25
|
+
ENDCAPS="${ENDCAPS_SHAPES[0]}"
|
|
26
26
|
CHARSET="${CHARSETS[0]}"
|
|
27
27
|
PRESET="${PRESETS[0]}"
|
|
28
28
|
COMPARE=""
|
|
@@ -109,10 +109,10 @@ ensure_daemon() {
|
|
|
109
109
|
# The wizard's substitution, exactly: the template with its four placeholders
|
|
110
110
|
# filled. Prints the written path.
|
|
111
111
|
fill_template() {
|
|
112
|
-
local theme="$1"
|
|
113
|
-
local out="${WORK}/config-${theme}-${
|
|
112
|
+
local theme="$1" endcaps="$2" charset="$3" preset="$4"
|
|
113
|
+
local out="${WORK}/config-${theme}-${endcaps}-${charset}-${preset}.json"
|
|
114
114
|
sed -e "s/replace:THEME/${theme}/" \
|
|
115
|
-
-e "s/replace:
|
|
115
|
+
-e "s/replace:ENDCAPS/${endcaps}/" \
|
|
116
116
|
-e "s/replace:CHARSET/${charset}/" \
|
|
117
117
|
-e "s/replace:PRESET/${preset}/" \
|
|
118
118
|
"${TEMPLATE}" >"${out}"
|
|
@@ -128,16 +128,16 @@ parse_args() {
|
|
|
128
128
|
while [[ $# -gt 0 ]]; do
|
|
129
129
|
case "$1" in
|
|
130
130
|
--theme=*) THEME="${1#*=}" ;;
|
|
131
|
-
--
|
|
131
|
+
--endcaps=*) ENDCAPS="${1#*=}" ;;
|
|
132
132
|
--charset=*) CHARSET="${1#*=}" ;;
|
|
133
133
|
--preset=*) PRESET="${1#*=}" ;;
|
|
134
134
|
--compare-themes) COMPARE="themes" ;;
|
|
135
|
-
--compare-
|
|
135
|
+
--compare-endcaps) COMPARE="endcaps" ;;
|
|
136
136
|
--compare-charsets) COMPARE="charsets" ;;
|
|
137
137
|
--compare-presets) COMPARE="presets" ;;
|
|
138
138
|
*)
|
|
139
139
|
printf 'Unknown option: %s\n' "$1" >&2
|
|
140
|
-
printf 'Usage: preview.sh [--theme=NAME] [--
|
|
140
|
+
printf 'Usage: preview.sh [--theme=NAME] [--endcaps=NAME] [--charset=NAME] [--preset=NAME] [--compare-themes|--compare-endcaps|--compare-charsets|--compare-presets]\n' >&2
|
|
141
141
|
exit 2
|
|
142
142
|
;;
|
|
143
143
|
esac
|
|
@@ -153,15 +153,15 @@ main() {
|
|
|
153
153
|
# The flag values are checked once, as the wizard's user would see them
|
|
154
154
|
# (exit 1 names the error). A compare varies one axis over its array, whose
|
|
155
155
|
# members test/plugin-templates.test.ts pins to the loader's own domain.
|
|
156
|
-
"${CLIENT[@]}" check "$(fill_template "${THEME}" "${
|
|
156
|
+
"${CLIENT[@]}" check "$(fill_template "${THEME}" "${ENDCAPS}" "${CHARSET}" "${PRESET}")" >/dev/null
|
|
157
157
|
|
|
158
158
|
local name
|
|
159
159
|
case "${COMPARE}" in
|
|
160
|
-
"") render "${THEME}" "${
|
|
161
|
-
themes) for name in "${THEMES[@]}"; do printf '%s:\n' "${name}"; render "${name}" "${
|
|
162
|
-
|
|
163
|
-
charsets) for name in "${CHARSETS[@]}"; do printf '%s:\n' "${name}"; render "${THEME}" "${
|
|
164
|
-
presets) for name in "${PRESETS[@]}"; do printf '%s:\n' "${name}"; render "${THEME}" "${
|
|
160
|
+
"") render "${THEME}" "${ENDCAPS}" "${CHARSET}" "${PRESET}" ;;
|
|
161
|
+
themes) for name in "${THEMES[@]}"; do printf '%s:\n' "${name}"; render "${name}" "${ENDCAPS}" "${CHARSET}" "${PRESET}"; printf '\n'; done ;;
|
|
162
|
+
endcaps) for name in "${ENDCAPS_SHAPES[@]}"; do printf '%s:\n' "${name}"; render "${THEME}" "${name}" "${CHARSET}" "${PRESET}"; printf '\n'; done ;;
|
|
163
|
+
charsets) for name in "${CHARSETS[@]}"; do printf '%s:\n' "${name}"; render "${THEME}" "${ENDCAPS}" "${name}" "${PRESET}"; printf '\n'; done ;;
|
|
164
|
+
presets) for name in "${PRESETS[@]}"; do printf '%s:\n' "${name}"; render "${THEME}" "${ENDCAPS}" "${CHARSET}" "${name}"; printf '\n'; done ;;
|
|
165
165
|
esac
|
|
166
166
|
}
|
|
167
167
|
|
|
@@ -17,7 +17,7 @@ You are running an interactive setup wizard to configure the cc-candybar statusl
|
|
|
17
17
|
## Operating rules
|
|
18
18
|
|
|
19
19
|
- One question per step. Wait for the user's answer before moving on. Do not skip or combine steps.
|
|
20
|
-
- Track the user's choices as four variables: `charset`, `theme`, `
|
|
20
|
+
- Track the user's choices as four variables: `charset`, `theme`, `endcaps`, `preset`. Every later command and the final config are built from exactly those four.
|
|
21
21
|
- Do NOT use the Agent tool or Explore subagents. Everything you need is in this document.
|
|
22
22
|
- Do NOT read source code from the cc-candybar package. Run only the subcommands this document names (`install`, `check`) and the plugin's preview script against it.
|
|
23
23
|
- IMPORTANT: After running any Bash or Read tool, repeat the key output as text in your response. Some users have a collapsed UI mode where tool outputs need a click to expand. Relay versions, option names, file paths, and command results in your text so the user sees them without expanding.
|
|
@@ -108,28 +108,28 @@ Then ask:
|
|
|
108
108
|
|
|
109
109
|
If the user types a name in the free text field, accept it only if the preview labeled it; otherwise show the labeled names again and re-ask. Set `theme`.
|
|
110
110
|
|
|
111
|
-
## Step 4:
|
|
111
|
+
## Step 4: Endcaps
|
|
112
112
|
|
|
113
113
|
> [!IMPORTANT]
|
|
114
114
|
> You cannot render ANSI escape codes or nerd font glyphs in your text output.
|
|
115
115
|
> You MUST run the preview command below and let the terminal display the result.
|
|
116
|
-
> Do NOT describe what the
|
|
116
|
+
> Do NOT describe what the endcaps look like. Let the user see them.
|
|
117
117
|
> After running, tell the user to expand the bash output if they cannot see the previews.
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
|
-
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-
|
|
120
|
+
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-endcaps --theme=${theme} --charset=${charset}
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
Tell the user: "The three
|
|
123
|
+
Tell the user: "The three endcaps previews are in the bash output above, each under its name. Expand it if needed."
|
|
124
124
|
|
|
125
125
|
Then ask:
|
|
126
126
|
|
|
127
|
-
- **Question**: "Which
|
|
128
|
-
- **Header**: "
|
|
127
|
+
- **Question**: "Which endcaps?"
|
|
128
|
+
- **Header**: "Endcaps"
|
|
129
129
|
- **Options**:
|
|
130
|
-
- "powerline" -> Set `
|
|
131
|
-
- "capsule" -> Set `
|
|
132
|
-
- "plain" -> Set `
|
|
130
|
+
- "powerline" -> Set `endcaps=powerline`
|
|
131
|
+
- "capsule" -> Set `endcaps=capsule`
|
|
132
|
+
- "plain" -> Set `endcaps=plain`
|
|
133
133
|
|
|
134
134
|
## Step 5: Preset
|
|
135
135
|
|
|
@@ -142,7 +142,7 @@ The preset is the bar's arrangement: which segments, on how many rows.
|
|
|
142
142
|
> After running, tell the user to expand the bash output if they cannot see the previews.
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
|
-
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-presets --theme=${theme} --
|
|
145
|
+
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-presets --theme=${theme} --endcaps=${endcaps} --charset=${charset}
|
|
146
146
|
```
|
|
147
147
|
|
|
148
148
|
Tell the user the previews are in the bash output above, then display:
|
|
@@ -153,7 +153,7 @@ Tell the user the previews are in the bash output above, then display:
|
|
|
153
153
|
1. **default** -- Two rows: an identity row (directory, git) over a status row (model, context window, cache timer, 5-hour block usage, weekly usage). Good default.
|
|
154
154
|
2. **compact** -- One row (directory, git, context window) with no cell padding. For narrow terminals and split panes.
|
|
155
155
|
3. **verbose** -- The default's two rows plus pull-request, burn-rate, token-speed and token-sparkline segments. Maximum information.
|
|
156
|
-
4. **zen** -- One quiet row (directory, context window)
|
|
156
|
+
4. **zen** -- One quiet row (directory, context window) with plain endcaps under the dim style, so it replaces the endcaps picked in Step 4. For heads-down work.
|
|
157
157
|
5. **git** -- The open pull request beside the git state, over a status row cut to model, context window and activity. For branch-and-review work.
|
|
158
158
|
6. **usage** -- Every cost and limit segment, one concern per row: context and cache, the rate-limit windows and burn rate, then session and today spend and token speed. For watching a budget.
|
|
159
159
|
7. **dense** -- The default's segments plus session spend on one row with no cell padding, wrapped only where the terminal runs out. For wide terminals.
|
|
@@ -204,7 +204,7 @@ stamp=$(date -u +%Y%m%dT%H%M%SZ)
|
|
|
204
204
|
| Placeholder | Replace with |
|
|
205
205
|
|-------------|--------------|
|
|
206
206
|
| `replace:THEME` | `theme` (the name chosen in Step 3) |
|
|
207
|
-
| `replace:
|
|
207
|
+
| `replace:ENDCAPS` | `endcaps` (`powerline`, `capsule`, or `plain`) |
|
|
208
208
|
| `replace:CHARSET` | `charset` (`unicode` or `ascii`) |
|
|
209
209
|
| `replace:PRESET` | `preset` (a name from Step 5's list) |
|
|
210
210
|
|
|
@@ -246,7 +246,7 @@ Exit 0 has two outcomes, told apart by the output:
|
|
|
246
246
|
> After running, tell the user to expand the bash output if they cannot see the preview.
|
|
247
247
|
|
|
248
248
|
```bash
|
|
249
|
-
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --theme=${theme} --
|
|
249
|
+
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --theme=${theme} --endcaps=${endcaps} --charset=${charset} --preset=${preset}
|
|
250
250
|
```
|
|
251
251
|
|
|
252
252
|
Tell the user: "Your statusline is in the bash output above. Expand it if needed."
|
|
@@ -264,7 +264,7 @@ Setup complete.
|
|
|
264
264
|
|
|
265
265
|
**What now:**
|
|
266
266
|
1. Restart Claude Code if the statusline does not appear.
|
|
267
|
-
2. The bar has its own settings menu: click `🍫` on the bar to switch
|
|
267
|
+
2. The bar has its own settings menu: click `🍫` on the bar to switch preset, theme, style, variation, endcaps, wrap and padding live. Click `💾 save` there to make your picks the durable default.
|
|
268
268
|
3. Hand edits to `~/.config/cc-candybar/config.json5` hot-reload; no restart needed.
|
|
269
269
|
4. Run `/candybar` any time to rerun this wizard.
|
|
270
270
|
|
|
@@ -17,24 +17,24 @@
|
|
|
17
17
|
"palette": {
|
|
18
18
|
"type": "string"
|
|
19
19
|
},
|
|
20
|
-
"
|
|
20
|
+
"style": {
|
|
21
21
|
"type": "string"
|
|
22
22
|
},
|
|
23
23
|
"preset": {
|
|
24
24
|
"type": "string"
|
|
25
25
|
},
|
|
26
|
-
"
|
|
26
|
+
"endcaps": {
|
|
27
27
|
"enum": [
|
|
28
28
|
"powerline",
|
|
29
29
|
"capsule",
|
|
30
30
|
"plain"
|
|
31
31
|
]
|
|
32
32
|
},
|
|
33
|
-
"
|
|
33
|
+
"variation": {
|
|
34
34
|
"enum": [
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
35
|
+
"accent",
|
|
36
|
+
"duo",
|
|
37
|
+
"mono"
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"autoWrap": {
|
|
@@ -1226,7 +1226,7 @@
|
|
|
1226
1226
|
]
|
|
1227
1227
|
}
|
|
1228
1228
|
},
|
|
1229
|
-
"
|
|
1229
|
+
"styles": {
|
|
1230
1230
|
"type": "object",
|
|
1231
1231
|
"additionalProperties": {
|
|
1232
1232
|
"type": "object",
|
|
@@ -1268,25 +1268,25 @@
|
|
|
1268
1268
|
"palette": {
|
|
1269
1269
|
"type": "string"
|
|
1270
1270
|
},
|
|
1271
|
-
"
|
|
1271
|
+
"style": {
|
|
1272
1272
|
"type": "string"
|
|
1273
1273
|
},
|
|
1274
1274
|
"preset": {
|
|
1275
1275
|
"not": {},
|
|
1276
1276
|
"description": "not allowed here — a preset cannot select a preset"
|
|
1277
1277
|
},
|
|
1278
|
-
"
|
|
1278
|
+
"endcaps": {
|
|
1279
1279
|
"enum": [
|
|
1280
1280
|
"powerline",
|
|
1281
1281
|
"capsule",
|
|
1282
1282
|
"plain"
|
|
1283
1283
|
]
|
|
1284
1284
|
},
|
|
1285
|
-
"
|
|
1285
|
+
"variation": {
|
|
1286
1286
|
"enum": [
|
|
1287
|
-
"
|
|
1288
|
-
"
|
|
1289
|
-
"
|
|
1287
|
+
"accent",
|
|
1288
|
+
"duo",
|
|
1289
|
+
"mono"
|
|
1290
1290
|
]
|
|
1291
1291
|
},
|
|
1292
1292
|
"autoWrap": {
|
|
@@ -1340,7 +1340,7 @@
|
|
|
1340
1340
|
"pattern": "\\{\\{"
|
|
1341
1341
|
}
|
|
1342
1342
|
},
|
|
1343
|
-
"
|
|
1343
|
+
"style": {
|
|
1344
1344
|
"type": "string",
|
|
1345
1345
|
"not": {
|
|
1346
1346
|
"pattern": "\\{\\{"
|
|
@@ -1350,18 +1350,18 @@
|
|
|
1350
1350
|
"not": {},
|
|
1351
1351
|
"description": "not allowed here — the editGlobals fragment cannot select a preset"
|
|
1352
1352
|
},
|
|
1353
|
-
"
|
|
1353
|
+
"endcaps": {
|
|
1354
1354
|
"enum": [
|
|
1355
1355
|
"powerline",
|
|
1356
1356
|
"capsule",
|
|
1357
1357
|
"plain"
|
|
1358
1358
|
]
|
|
1359
1359
|
},
|
|
1360
|
-
"
|
|
1360
|
+
"variation": {
|
|
1361
1361
|
"enum": [
|
|
1362
|
-
"
|
|
1363
|
-
"
|
|
1364
|
-
"
|
|
1362
|
+
"accent",
|
|
1363
|
+
"duo",
|
|
1364
|
+
"mono"
|
|
1365
1365
|
]
|
|
1366
1366
|
},
|
|
1367
1367
|
"autoWrap": {
|