@promptctl/cc-candybar 1.136.1 → 1.138.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptctl/cc-candybar",
3
- "version": "1.136.1",
3
+ "version": "1.138.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",
@@ -102,9 +102,9 @@
102
102
  "typescript": "^5.0.0"
103
103
  },
104
104
  "optionalDependencies": {
105
- "@promptctl/cc-candybar-darwin-arm64": "1.136.1",
106
- "@promptctl/cc-candybar-darwin-x64": "1.136.1",
107
- "@promptctl/cc-candybar-linux-x64": "1.136.1",
108
- "@promptctl/cc-candybar-linux-arm64": "1.136.1"
105
+ "@promptctl/cc-candybar-darwin-arm64": "1.138.0",
106
+ "@promptctl/cc-candybar-darwin-x64": "1.138.0",
107
+ "@promptctl/cc-candybar-linux-x64": "1.138.0",
108
+ "@promptctl/cc-candybar-linux-arm64": "1.138.0"
109
109
  }
110
110
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-candybar",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "CCCandybar statusline setup wizard",
5
5
  "author": {
6
6
  "name": "promptctl"
@@ -1,9 +1,9 @@
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, endcaps shape, charset, or preset.
3
+ # see a real bar before committing to a theme, endcaps shape, or preset.
4
4
  #
5
5
  # The config rendered here IS the template the wizard writes — templates/config.json
6
- # with its four placeholders filled by the same substitution the wizard performs —
6
+ # with its three placeholders filled by the same substitution the wizard performs —
7
7
  # so the preview cannot drift from what the wizard installs.
8
8
  # (test/plugin-templates.test.ts drives every name below through `cc-candybar check`.)
9
9
 
@@ -18,12 +18,10 @@ readonly TEMPLATE="${PLUGIN_ROOT}/templates/config.json"
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
20
  readonly ENDCAPS_SHAPES=(powerline prism slant backslant flame pixel ice bubble capsule wrapper metro stitch torn plain)
21
- readonly CHARSETS=(unicode ascii)
22
21
  readonly PRESETS=(default compact verbose zen git usage dense)
23
22
 
24
23
  THEME="${THEMES[0]}"
25
24
  ENDCAPS="${ENDCAPS_SHAPES[0]}"
26
- CHARSET="${CHARSETS[0]}"
27
25
  PRESET="${PRESETS[0]}"
28
26
  COMPARE=""
29
27
 
@@ -106,14 +104,13 @@ ensure_daemon() {
106
104
  done
107
105
  }
108
106
 
109
- # The wizard's substitution, exactly: the template with its four placeholders
107
+ # The wizard's substitution, exactly: the template with its three placeholders
110
108
  # filled. Prints the written path.
111
109
  fill_template() {
112
- local theme="$1" endcaps="$2" charset="$3" preset="$4"
113
- local out="${WORK}/config-${theme}-${endcaps}-${charset}-${preset}.json"
110
+ local theme="$1" endcaps="$2" preset="$3"
111
+ local out="${WORK}/config-${theme}-${endcaps}-${preset}.json"
114
112
  sed -e "s/replace:THEME/${theme}/" \
115
113
  -e "s/replace:ENDCAPS/${endcaps}/" \
116
- -e "s/replace:CHARSET/${charset}/" \
117
114
  -e "s/replace:PRESET/${preset}/" \
118
115
  "${TEMPLATE}" >"${out}"
119
116
  printf '%s' "${out}"
@@ -129,15 +126,13 @@ parse_args() {
129
126
  case "$1" in
130
127
  --theme=*) THEME="${1#*=}" ;;
131
128
  --endcaps=*) ENDCAPS="${1#*=}" ;;
132
- --charset=*) CHARSET="${1#*=}" ;;
133
129
  --preset=*) PRESET="${1#*=}" ;;
134
130
  --compare-themes) COMPARE="themes" ;;
135
131
  --compare-endcaps) COMPARE="endcaps" ;;
136
- --compare-charsets) COMPARE="charsets" ;;
137
132
  --compare-presets) COMPARE="presets" ;;
138
133
  *)
139
134
  printf 'Unknown option: %s\n' "$1" >&2
140
- printf 'Usage: preview.sh [--theme=NAME] [--endcaps=NAME] [--charset=NAME] [--preset=NAME] [--compare-themes|--compare-endcaps|--compare-charsets|--compare-presets]\n' >&2
135
+ printf 'Usage: preview.sh [--theme=NAME] [--endcaps=NAME] [--preset=NAME] [--compare-themes|--compare-endcaps|--compare-presets]\n' >&2
141
136
  exit 2
142
137
  ;;
143
138
  esac
@@ -153,15 +148,14 @@ main() {
153
148
  # The flag values are checked once, as the wizard's user would see them
154
149
  # (exit 1 names the error). A compare varies one axis over its array, whose
155
150
  # members test/plugin-templates.test.ts pins to the loader's own domain.
156
- "${CLIENT[@]}" check "$(fill_template "${THEME}" "${ENDCAPS}" "${CHARSET}" "${PRESET}")" >/dev/null
151
+ "${CLIENT[@]}" check "$(fill_template "${THEME}" "${ENDCAPS}" "${PRESET}")" >/dev/null
157
152
 
158
153
  local name
159
154
  case "${COMPARE}" in
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 ;;
155
+ "") render "${THEME}" "${ENDCAPS}" "${PRESET}" ;;
156
+ themes) for name in "${THEMES[@]}"; do printf '%s:\n' "${name}"; render "${name}" "${ENDCAPS}" "${PRESET}"; printf '\n'; done ;;
157
+ endcaps) for name in "${ENDCAPS_SHAPES[@]}"; do printf '%s:\n' "${name}"; render "${THEME}" "${name}" "${PRESET}"; printf '\n'; done ;;
158
+ presets) for name in "${PRESETS[@]}"; do printf '%s:\n' "${name}"; render "${THEME}" "${ENDCAPS}" "${name}"; printf '\n'; done ;;
165
159
  esac
166
160
  }
167
161
 
@@ -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`, `endcaps`, `preset`. Every later command and the final config are built from exactly those four.
20
+ - Track the user's choices as three variables: `theme`, `endcaps`, `preset`. Every later command and the final config are built from exactly those three.
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.
@@ -83,8 +83,13 @@ Then ask:
83
83
  - **Question**: "Do the powerline arrows and capsule half-circles render as shapes?"
84
84
  - **Header**: "Nerd Font"
85
85
  - **Options**:
86
- - "Yes, I see arrows and half-circles" -> Set `charset=unicode`
87
- - "No, I see boxes, blanks, or question marks" -> Set `charset=ascii`
86
+ - "Yes, I see arrows and half-circles" -> Continue to Step 3
87
+ - "No, I see boxes, blanks, or question marks" -> The bar draws Nerd Font glyphs, so it needs one. Tell them to install a Nerd Font (https://www.nerdfonts.com) and set it as their terminal's font, then ask:
88
+ - **Question**: "Set a Nerd Font, then check again?"
89
+ - **Header**: "Nerd Font"
90
+ - **Options**:
91
+ - "I set one, check again" -> Re-run Step 2 from the top
92
+ - "Exit wizard" -> Tell them to set a Nerd Font as their terminal's font and rerun `/candybar`, then stop
88
93
 
89
94
  ## Step 3: Theme
90
95
 
@@ -95,7 +100,7 @@ Then ask:
95
100
  > After running, tell the user to expand the bash output if they cannot see the previews.
96
101
 
97
102
  ```bash
98
- ${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-themes --charset=${charset}
103
+ ${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-themes
99
104
  ```
100
105
 
101
106
  The output is one block per theme: a label line of the theme's name followed by a colon, then that theme's rendered bar. That label list is the theme list; there is no other. List the labeled names in your text (names only, in the order printed) and tell the user the previews are in the bash output above.
@@ -117,7 +122,7 @@ If the user types a name in the free text field, accept it only if the preview l
117
122
  > After running, tell the user to expand the bash output if they cannot see the previews.
118
123
 
119
124
  ```bash
120
- ${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-endcaps --theme=${theme} --charset=${charset}
125
+ ${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-endcaps --theme=${theme}
121
126
  ```
122
127
 
123
128
  Tell the user: "The endcaps previews are in the bash output above, each under its name. Expand it if needed. A preview drawn with boxes or question marks uses glyphs your font lacks — pick another."
@@ -145,7 +150,7 @@ The preset is the bar's arrangement: which segments, on how many rows.
145
150
  > After running, tell the user to expand the bash output if they cannot see the previews.
146
151
 
147
152
  ```bash
148
- ${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-presets --theme=${theme} --endcaps=${endcaps} --charset=${charset}
153
+ ${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-presets --theme=${theme} --endcaps=${endcaps}
149
154
  ```
150
155
 
151
156
  Tell the user the previews are in the bash output above, then display:
@@ -202,13 +207,12 @@ stamp=$(date -u +%Y%m%dT%H%M%SZ)
202
207
  ${CLAUDE_PLUGIN_ROOT}/templates/config.json
203
208
  ```
204
209
 
205
- 2. Replace the four placeholders in the template content:
210
+ 2. Replace the three placeholders in the template content:
206
211
 
207
212
  | Placeholder | Replace with |
208
213
  |-------------|--------------|
209
214
  | `replace:THEME` | `theme` (the name chosen in Step 3) |
210
215
  | `replace:ENDCAPS` | `endcaps` (a name the endcaps preview showed) |
211
- | `replace:CHARSET` | `charset` (`unicode` or `ascii`) |
212
216
  | `replace:PRESET` | `preset` (a name from Step 5's list) |
213
217
 
214
218
  3. Write the result to `~/.config/cc-candybar/config.json5` with the Write tool (create the directory if needed). Do NOT read or merge with any existing config; the file is replaced whole.
@@ -249,7 +253,7 @@ Exit 0 has two outcomes, told apart by the output:
249
253
  > After running, tell the user to expand the bash output if they cannot see the preview.
250
254
 
251
255
  ```bash
252
- ${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --theme=${theme} --endcaps=${endcaps} --charset=${charset} --preset=${preset}
256
+ ${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --theme=${theme} --endcaps=${endcaps} --preset=${preset}
253
257
  ```
254
258
 
255
259
  Tell the user: "Your statusline is in the bash output above. Expand it if needed."
@@ -2,7 +2,6 @@
2
2
  "globals": {
3
3
  "palette": "replace:THEME",
4
4
  "endcaps": "replace:ENDCAPS",
5
- "charset": "replace:CHARSET",
6
5
  "preset": "replace:PRESET"
7
6
  }
8
7
  }
@@ -84,12 +84,6 @@
84
84
  "minimum": 0,
85
85
  "maximum": 16
86
86
  },
87
- "charset": {
88
- "enum": [
89
- "unicode",
90
- "ascii"
91
- ]
92
- },
93
87
  "updateNotice": {
94
88
  "type": "boolean"
95
89
  },
@@ -1324,12 +1318,6 @@
1324
1318
  "minimum": 0,
1325
1319
  "maximum": 16
1326
1320
  },
1327
- "charset": {
1328
- "enum": [
1329
- "unicode",
1330
- "ascii"
1331
- ]
1332
- },
1333
1321
  "updateNotice": {
1334
1322
  "type": "boolean"
1335
1323
  },
@@ -1444,12 +1432,6 @@
1444
1432
  "minimum": 0,
1445
1433
  "maximum": 16
1446
1434
  },
1447
- "charset": {
1448
- "enum": [
1449
- "unicode",
1450
- "ascii"
1451
- ]
1452
- },
1453
1435
  "updateNotice": {
1454
1436
  "type": "boolean"
1455
1437
  },