@owloops/claude-powerline 1.1.12 → 1.1.13

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.
Files changed (2) hide show
  1. package/README.md +57 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -259,6 +259,63 @@ To customize colors, copy dark or light theme colors from `src/themes/` in the r
259
259
  }
260
260
  ```
261
261
 
262
+ ## Custom Segments
263
+
264
+ Extend the statusline by wrapping the command with shell composition:
265
+
266
+ ### Add Custom Segments
267
+
268
+ Use `tput` for colors that match your terminal theme:
269
+
270
+ ```json
271
+ {
272
+ "statusLine": {
273
+ "type": "command",
274
+ "command": "npx -y @owloops/claude-powerline && echo \"$(tput setab 4)$(tput setaf 15) ⏱ $(date +%H:%M) $(tput sgr0)\"",
275
+ "padding": 0
276
+ }
277
+ }
278
+ ```
279
+
280
+ Common `tput` colors:
281
+
282
+ - `setab 1` (red bg) `setaf 15` (white fg)
283
+ - `setab 2` (green bg) `setaf 0` (black fg)
284
+ - `setab 4` (blue bg) `setaf 15` (white fg)
285
+ - `setab 6` (cyan bg) `setaf 0` (black fg)
286
+
287
+ ### Custom Wrapper Script
288
+
289
+ Create `~/.local/bin/my-statusline`:
290
+
291
+ ```bash
292
+ #!/bin/bash
293
+ # Option 1: Same line (continuous)
294
+ cat | npx -y @owloops/claude-powerline | tr -d '\n'
295
+ echo -n "$(tput setab 6)$(tput setaf 0) ⏱ $(date +%H:%M) $(tput sgr0)"
296
+ echo "$(tput setab 2)$(tput setaf 0) ☁ $(curl -s wttr.in?format=%t 2>/dev/null || echo '?') $(tput sgr0)"
297
+
298
+ # Option 2: Separate lines (multiline)
299
+ # cat | npx -y @owloops/claude-powerline
300
+ # echo "$(tput setab 6)$(tput setaf 0) ⏱ $(date +%H:%M) $(tput sgr0)"
301
+ # echo "$(tput setab 2)$(tput setaf 0) ☁ $(curl -s wttr.in?format=%t 2>/dev/null || echo '?') $(tput sgr0)"
302
+ ```
303
+
304
+ Then use it in `settings.json`:
305
+
306
+ ```json
307
+ {
308
+ "statusLine": {
309
+ "type": "command",
310
+ "command": "/full/path/to/my-statusline",
311
+ "padding": 0
312
+ }
313
+ }
314
+ ```
315
+
316
+ > [!TIP]
317
+ > Shell composition provides unlimited flexibility while keeping the core package secure - no arbitrary command execution needed. Use full absolute paths or ensure scripts are in your PATH.
318
+
262
319
  ## Environment Variables
263
320
 
264
321
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owloops/claude-powerline",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "description": "Beautiful vim-style powerline statusline for Claude Code with real-time cost tracking, git integration, and custom themes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",