ccstatusline 2.0.7 → 2.0.8

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 CHANGED
@@ -42,6 +42,12 @@
42
42
 
43
43
  ## 🆕 Recent Updates
44
44
 
45
+ ### v2.0.8 - Powerline Auto-Alignment
46
+
47
+ ![Powerline Auto-Alignment](https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/screenshots/autoAlign.png)
48
+
49
+ - **🎯 Widget Alignment** - Auto-align widgets across multiple status lines in Powerline mode for a clean, columnar layout (toggle with 'a' in Powerline Setup)
50
+
45
51
  ### v2.0.7 - Current Working Directory & Session Cost
46
52
 
47
53
  ![Current Working Directory and Session Cost](https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/screenshots/cwdAndSessionCost.png)
@@ -88,7 +94,7 @@
88
94
  - **⚡ Powerline Support** - Beautiful Powerline-style rendering with arrow separators, caps, and custom fonts
89
95
  - **📐 Multi-line Support** - Configure up to 3 independent status lines
90
96
  - **🖥️ Interactive TUI** - Built-in configuration interface using React/Ink
91
- - **⚙️ Global Options** - Apply consistent formatting across all items (padding, separators, bold, background)
97
+ - **⚙️ Global Options** - Apply consistent formatting across all widgets (padding, separators, bold, background)
92
98
  - **🚀 Cross-platform** - Works seamlessly with both Bun and Node.js
93
99
  - **📏 Smart Width Detection** - Automatically adapts to terminal width with flex separators
94
100
  - **⚡ Zero Config** - Sensible defaults that work out of the box
@@ -111,10 +117,10 @@ bunx ccstatusline@latest
111
117
 
112
118
  The interactive configuration tool provides a terminal UI where you can:
113
119
  - Configure up to 3 separate status lines
114
- - Add/remove/reorder status line items
115
- - Customize colors for each element
120
+ - Add/remove/reorder status line widgets
121
+ - Customize colors for each widget
116
122
  - Configure flex separator behavior
117
- - Edit custom text items
123
+ - Edit custom text widgets
118
124
  - Install/uninstall to Claude Code settings
119
125
  - Preview your status line in real-time
120
126
 
@@ -126,13 +132,15 @@ The interactive configuration tool provides a terminal UI where you can:
126
132
 
127
133
  Once configured, ccstatusline automatically formats your Claude Code status line. The status line appears at the bottom of your terminal during Claude Code sessions.
128
134
 
129
- ### 📊 Available Status Items
135
+ ### 📊 Available Widgets
130
136
 
131
137
  - **Model Name** - Shows the current Claude model (e.g., "Claude 3.5 Sonnet")
132
138
  - **Git Branch** - Displays current git branch name
133
139
  - **Git Changes** - Shows uncommitted insertions/deletions (e.g., "+42,-10")
134
140
  - **Session Clock** - Shows elapsed time since session start (e.g., "2hr 15m")
141
+ - **Session Cost** - Shows total session cost in USD (e.g., "$1.23")
135
142
  - **Block Timer** - Shows time elapsed in current 5-hour block or progress bar
143
+ - **Current Working Directory** - Shows current working directory with configurable path segments
136
144
  - **Version** - Shows Claude Code version
137
145
  - **Output Style** - Shows the currently set output style in Claude Code
138
146
  - **Tokens Input** - Shows input tokens used
@@ -145,7 +153,7 @@ Once configured, ccstatusline automatically formats your Claude Code status line
145
153
  - **Terminal Width** - Shows detected terminal width (for debugging)
146
154
  - **Custom Text** - Add your own custom text to the status line
147
155
  - **Custom Command** - Execute shell commands and display their output (refreshes whenever the statusline is updated by Claude Code)
148
- - **Separator** - Visual divider between items (customizable: |, -, comma, space)
156
+ - **Separator** - Visual divider between widgets (customizable: |, -, comma, space)
149
157
  - **Flex Separator** - Expands to fill available space
150
158
 
151
159
  ---
@@ -160,13 +168,13 @@ These settings affect where long lines are truncated, and where right-alignment
160
168
 
161
169
  ### ⚙️ Global Options
162
170
 
163
- Configure global formatting preferences that apply to all status items:
171
+ Configure global formatting preferences that apply to all widgets:
164
172
 
165
173
  ![Global Options](https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/screenshots/global.png)
166
174
 
167
175
  #### Default Padding & Separators
168
- - **Default Padding** - Add consistent padding to the left and right of each item
169
- - **Default Separator** - Automatically insert a separator between all items
176
+ - **Default Padding** - Add consistent padding to the left and right of each widget
177
+ - **Default Separator** - Automatically insert a separator between all widgets
170
178
  - Press **(p)** to edit padding
171
179
  - Press **(s)** to edit separator
172
180
 
@@ -175,18 +183,18 @@ Configure global formatting preferences that apply to all status items:
175
183
 
176
184
  - **Inherit Colors** - Default separators inherit foreground and background colors from the preceding widget
177
185
  - Press **(i)** to toggle
178
- - **Global Bold** - Apply bold formatting to all text regardless of individual item settings
186
+ - **Global Bold** - Apply bold formatting to all text regardless of individual widget settings
179
187
  - Press **(o)** to toggle
180
- - **Override Foreground Color** - Force all items to use the same text color
188
+ - **Override Foreground Color** - Force all widgets to use the same text color
181
189
  - Press **(f)** to cycle through colors
182
190
  - Press **(g)** to clear override
183
- - **Override Background Color** - Force all items to use the same background color
191
+ - **Override Background Color** - Force all widgets to use the same background color
184
192
  - Press **(b)** to cycle through colors
185
193
  - Press **(c)** to clear override
186
194
 
187
195
  </details>
188
196
 
189
- > 💡 **Note:** These settings are applied during rendering and don't add items to your widget list. They provide a consistent look across your entire status line without modifying individual item configurations.
197
+ > 💡 **Note:** These settings are applied during rendering and don't add widgets to your widget list. They provide a consistent look across your entire status line without modifying individual widget configurations.
190
198
 
191
199
  > ⚠️ **VSCode Users:** If colors appear incorrect in the VSCode integrated terminal, the "Terminal › Integrated: Minimum Contrast Ratio" (`terminal.integrated.minimumContrastRatio`) setting is forcing a minimum contrast between foreground and background colors. You can adjust this setting to 1 to disable the contrast enforcement, or use a standalone terminal for accurate colors.
192
200
 
@@ -206,11 +214,11 @@ The Block Timer widget helps you track your progress through Claude Code's 5-hou
206
214
  - Floors block start time to the hour for consistent tracking
207
215
  - Shows "Block: 3hr 45m" in normal mode or just "3hr 45m" in raw value mode
208
216
  - Progress bars show completion percentage (e.g., "[████████████████████████░░░░░░░░] 73.9%")
209
- - Toggle between modes with the **(p)** key in the items editor
217
+ - Toggle between modes with the **(p)** key in the widgets editor
210
218
 
211
219
  ### 🔤 Raw Value Mode
212
220
 
213
- Some items support "raw value" mode which displays just the value without a label:
221
+ Some widgets support "raw value" mode which displays just the value without a label:
214
222
  - Normal: `Model: Claude 3.5 Sonnet` → Raw: `Claude 3.5 Sonnet`
215
223
  - Normal: `Session: 2hr 15m` → Raw: `2hr 15m`
216
224
  - Normal: `Block: 3hr 45m` → Raw: `3hr 45m`
@@ -50535,7 +50535,8 @@ var PowerlineConfigSchema = exports_external.object({
50535
50535
  separatorInvertBackground: exports_external.array(exports_external.boolean()).default([false]),
50536
50536
  startCaps: exports_external.array(exports_external.string()).default([]),
50537
50537
  endCaps: exports_external.array(exports_external.string()).default([]),
50538
- theme: exports_external.string().optional()
50538
+ theme: exports_external.string().optional(),
50539
+ autoAlign: exports_external.boolean().default(false)
50539
50540
  });
50540
50541
 
50541
50542
  // src/types/Widget.ts
@@ -50598,7 +50599,8 @@ var SettingsSchema = exports_external.object({
50598
50599
  separatorInvertBackground: [false],
50599
50600
  startCaps: [],
50600
50601
  endCaps: [],
50601
- theme: undefined
50602
+ theme: undefined,
50603
+ autoAlign: false
50602
50604
  }),
50603
50605
  updatemessage: exports_external.object({
50604
50606
  message: exports_external.string().nullable().optional(),
@@ -51035,7 +51037,7 @@ import { execSync as execSync3 } from "child_process";
51035
51037
  import * as fs5 from "fs";
51036
51038
  import * as path4 from "path";
51037
51039
  var __dirname = "/Users/sirmalloc/Projects/Personal/ccstatusline/src/utils";
51038
- var PACKAGE_VERSION = "2.0.7";
51040
+ var PACKAGE_VERSION = "2.0.8";
51039
51041
  function getPackageVersion() {
51040
51042
  if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
51041
51043
  return PACKAGE_VERSION;
@@ -52036,7 +52038,7 @@ function formatTokens(count) {
52036
52038
  return `${(count / 1000).toFixed(1)}k`;
52037
52039
  return count.toString();
52038
52040
  }
52039
- function renderPowerlineStatusLine(widgets, settings, context, lineIndex = 0, globalSeparatorOffset = 0) {
52041
+ function renderPowerlineStatusLine(widgets, settings, context, lineIndex = 0, globalSeparatorOffset = 0, allLinesWidgets) {
52040
52042
  const powerlineConfig = settings.powerline;
52041
52043
  const config2 = powerlineConfig ?? {};
52042
52044
  const separators = config2.separators ?? [""];
@@ -52143,6 +52145,57 @@ function renderPowerlineStatusLine(widgets, settings, context, lineIndex = 0, gl
52143
52145
  }
52144
52146
  if (widgetElements.length === 0)
52145
52147
  return "";
52148
+ const autoAlign = config2.autoAlign;
52149
+ if (autoAlign && allLinesWidgets) {
52150
+ const maxWidths = [];
52151
+ const allLinesElements = [];
52152
+ for (const lineWidgets of allLinesWidgets) {
52153
+ const filteredLineWidgets = lineWidgets.filter((w) => w.type !== "separator" && w.type !== "flex-separator");
52154
+ const lineElements = [];
52155
+ for (const widget of filteredLineWidgets) {
52156
+ let widgetText = "";
52157
+ try {
52158
+ const widgetImpl = getWidget(widget.type);
52159
+ widgetText = widgetImpl.render(widget, context, settings) ?? "";
52160
+ } catch {
52161
+ continue;
52162
+ }
52163
+ if (widgetText) {
52164
+ const padding = settings.defaultPadding ?? "";
52165
+ const paddedText = `${padding}${widgetText}${padding}`;
52166
+ lineElements.push({
52167
+ content: paddedText,
52168
+ bgColor: widget.backgroundColor,
52169
+ fgColor: widget.color,
52170
+ widget
52171
+ });
52172
+ }
52173
+ }
52174
+ allLinesElements.push(lineElements);
52175
+ }
52176
+ for (let pos = 0;pos < Math.max(...allLinesElements.map((line) => line.length)); pos++) {
52177
+ let maxWidth = 0;
52178
+ for (const lineElements of allLinesElements) {
52179
+ const element = lineElements[pos];
52180
+ if (element) {
52181
+ const plainLength = element.content.replace(ANSI_REGEX, "").length;
52182
+ maxWidth = Math.max(maxWidth, plainLength);
52183
+ }
52184
+ }
52185
+ maxWidths.push(maxWidth);
52186
+ }
52187
+ for (let i = 0;i < widgetElements.length; i++) {
52188
+ const element = widgetElements[i];
52189
+ const maxWidth = maxWidths[i];
52190
+ if (element && maxWidth !== undefined) {
52191
+ const currentLength = element.content.replace(ANSI_REGEX, "").length;
52192
+ const paddingNeeded = maxWidth - currentLength;
52193
+ if (paddingNeeded > 0) {
52194
+ element.content += " ".repeat(paddingNeeded);
52195
+ }
52196
+ }
52197
+ }
52198
+ }
52146
52199
  let result = "";
52147
52200
  if (startCap && widgetElements.length > 0) {
52148
52201
  const firstWidget = widgetElements[0];
@@ -52303,18 +52356,17 @@ function formatSeparator(sep) {
52303
52356
  }
52304
52357
  return sep;
52305
52358
  }
52306
- function renderStatusLineWithInfo(widgets, settings, context) {
52307
- const line = renderStatusLine(widgets, settings, context);
52359
+ function renderStatusLineWithInfo(widgets, settings, context, allLinesWidgets) {
52360
+ const line = renderStatusLine(widgets, settings, context, allLinesWidgets);
52308
52361
  const wasTruncated = line.includes("...");
52309
52362
  return { line, wasTruncated };
52310
52363
  }
52311
- function renderStatusLine(widgets, settings, context) {
52364
+ function renderStatusLine(widgets, settings, context, allLinesWidgets) {
52312
52365
  const colorLevel = getColorLevelString(settings.colorLevel);
52313
52366
  const powerlineSettings = settings.powerline;
52314
52367
  const isPowerlineMode = Boolean(powerlineSettings?.enabled);
52315
- if (isPowerlineMode) {
52316
- return renderPowerlineStatusLine(widgets, settings, context, context.lineIndex ?? 0, context.globalSeparatorIndex ?? 0);
52317
- }
52368
+ if (isPowerlineMode)
52369
+ return renderPowerlineStatusLine(widgets, settings, context, context.lineIndex ?? 0, context.globalSeparatorIndex ?? 0, allLinesWidgets);
52318
52370
  const applyColorsWithOverride = (text, foregroundColor, backgroundColor, bold) => {
52319
52371
  let fgColor = foregroundColor;
52320
52372
  if (settings.overrideForegroundColor && settings.overrideForegroundColor !== "none") {
@@ -53815,12 +53867,12 @@ var ColorMenu = ({ widgets, lineIndex, settings, onUpdate, onBack }) => {
53815
53867
  marginTop: 1,
53816
53868
  children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
53817
53869
  dimColor: true,
53818
- children: "No colorable items in the status line."
53870
+ children: "No colorable widgets in the status line."
53819
53871
  }, undefined, false, undefined, this)
53820
53872
  }, undefined, false, undefined, this),
53821
53873
  /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
53822
53874
  dimColor: true,
53823
- children: "Add a Model or Git Branch item first."
53875
+ children: "Add a widget first to continue."
53824
53876
  }, undefined, false, undefined, this),
53825
53877
  /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
53826
53878
  marginTop: 1,
@@ -54244,7 +54296,7 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
54244
54296
  }, undefined, false, undefined, this),
54245
54297
  /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
54246
54298
  dimColor: true,
54247
- children: "Configure automatic padding and separators between items"
54299
+ children: "Configure automatic padding and separators between widgets"
54248
54300
  }, undefined, false, undefined, this),
54249
54301
  isPowerlineEnabled && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
54250
54302
  marginTop: 1,
@@ -54262,7 +54314,7 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
54262
54314
  /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
54263
54315
  children: [
54264
54316
  /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
54265
- children: "Enter default padding (applied to left and right of each item): "
54317
+ children: "Enter default padding (applied to left and right of each widget): "
54266
54318
  }, undefined, false, undefined, this),
54267
54319
  /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
54268
54320
  color: "cyan",
@@ -54281,7 +54333,7 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
54281
54333
  /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
54282
54334
  children: [
54283
54335
  /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
54284
- children: "Enter default separator (placed between items): "
54336
+ children: "Enter default separator (placed between widgets): "
54285
54337
  }, undefined, false, undefined, this),
54286
54338
  /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
54287
54339
  color: "cyan",
@@ -54492,7 +54544,7 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
54492
54544
  /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
54493
54545
  dimColor: true,
54494
54546
  wrap: "wrap",
54495
- children: "Note: These settings are applied during rendering and don't add items to your widget list."
54547
+ children: "Note: These settings are applied during rendering and don't add widgets to your widget list."
54496
54548
  }, undefined, false, undefined, this),
54497
54549
  /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
54498
54550
  dimColor: true,
@@ -54507,7 +54559,7 @@ var GlobalOverridesMenu = ({ settings, onUpdate, onBack }) => {
54507
54559
  /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
54508
54560
  dimColor: true,
54509
54561
  wrap: "wrap",
54510
- children: "• Override colors: All items will use these colors instead of their configured colors"
54562
+ children: "• Override colors: All widgets will use these colors instead of their configured colors"
54511
54563
  }, undefined, false, undefined, this)
54512
54564
  ]
54513
54565
  }, undefined, true, undefined, this)
@@ -54934,7 +54986,7 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
54934
54986
  marginBottom: 1,
54935
54987
  children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
54936
54988
  dimColor: true,
54937
- children: "↑↓ to move item, ESC or Enter to exit move mode"
54989
+ children: "↑↓ to move widget, ESC or Enter to exit move mode"
54938
54990
  }, undefined, false, undefined, this)
54939
54991
  }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
54940
54992
  flexDirection: "column",
@@ -54967,7 +55019,7 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
54967
55019
  flexDirection: "column",
54968
55020
  children: widgets.length === 0 ? /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
54969
55021
  dimColor: true,
54970
- children: "No items. Press 'a' to add one."
55022
+ children: "No widgets. Press 'a' to add one."
54971
55023
  }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(jsx_dev_runtime8.Fragment, {
54972
55024
  children: [
54973
55025
  widgets.map((widget, index) => {
@@ -55018,7 +55070,7 @@ var ItemsEditor = ({ widgets, onUpdate, onBack, lineNumber, settings }) => {
55018
55070
  dimColor: true,
55019
55071
  children: (() => {
55020
55072
  if (currentWidget.type === "separator") {
55021
- return "A separator character between status line items";
55073
+ return "A separator character between status line widgets";
55022
55074
  } else if (currentWidget.type === "flex-separator") {
55023
55075
  return "Expands to fill available terminal width";
55024
55076
  } else {
@@ -55138,7 +55190,7 @@ var LineSelector = ({ lines, onSelect, onBack, initialSelection = 0, title, bloc
55138
55190
  children: [
55139
55191
  selectedIndex === 0 ? "▶ " : " ",
55140
55192
  "☰ Line 1",
55141
- lines[0] && lines[0].length > 0 ? ` (${lines[0].length} items)` : " (empty)"
55193
+ lines[0] && lines[0].length > 0 ? ` (${lines[0].length} widgets)` : " (empty)"
55142
55194
  ]
55143
55195
  }, undefined, true, undefined, this)
55144
55196
  }, undefined, false, undefined, this),
@@ -55148,7 +55200,7 @@ var LineSelector = ({ lines, onSelect, onBack, initialSelection = 0, title, bloc
55148
55200
  children: [
55149
55201
  selectedIndex === 1 ? "▶ " : " ",
55150
55202
  "☰ Line 2",
55151
- lines[1] && lines[1].length > 0 ? ` (${lines[1].length} items)` : " (empty)"
55203
+ lines[1] && lines[1].length > 0 ? ` (${lines[1].length} widgets)` : " (empty)"
55152
55204
  ]
55153
55205
  }, undefined, true, undefined, this)
55154
55206
  }, undefined, false, undefined, this),
@@ -55158,7 +55210,7 @@ var LineSelector = ({ lines, onSelect, onBack, initialSelection = 0, title, bloc
55158
55210
  children: [
55159
55211
  selectedIndex === 2 ? "▶ " : " ",
55160
55212
  "☰ Line 3",
55161
- lines[2] && lines[2].length > 0 ? ` (${lines[2].length} items)` : " (empty)"
55213
+ lines[2] && lines[2].length > 0 ? ` (${lines[2].length} widgets)` : " (empty)"
55162
55214
  ]
55163
55215
  }, undefined, true, undefined, this)
55164
55216
  }, undefined, false, undefined, this),
@@ -55908,6 +55960,9 @@ var PowerlineSetup = ({
55908
55960
  }
55909
55961
  } else if (input === "i" || input === "I") {
55910
55962
  setConfirmingFontInstall(true);
55963
+ } else if ((input === "a" || input === "A") && powerlineConfig.enabled) {
55964
+ const newConfig = { ...powerlineConfig, autoAlign: !powerlineConfig.autoAlign };
55965
+ onUpdate({ ...settings, powerline: newConfig });
55911
55966
  }
55912
55967
  }
55913
55968
  });
@@ -56175,7 +56230,7 @@ var PowerlineSetup = ({
56175
56230
  flexDirection: "column",
56176
56231
  children: /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
56177
56232
  children: [
56178
- " Font Status: ",
56233
+ " Font Status: ",
56179
56234
  powerlineFontStatus.installed ? /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
56180
56235
  children: [
56181
56236
  /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
@@ -56205,7 +56260,7 @@ var PowerlineSetup = ({
56205
56260
  /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Box_default, {
56206
56261
  children: [
56207
56262
  /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
56208
- children: "Powerline Mode: "
56263
+ children: " Powerline Mode: "
56209
56264
  }, undefined, false, undefined, this),
56210
56265
  /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
56211
56266
  color: powerlineConfig.enabled ? "green" : "red",
@@ -56217,14 +56272,33 @@ var PowerlineSetup = ({
56217
56272
  }, undefined, false, undefined, this)
56218
56273
  ]
56219
56274
  }, undefined, true, undefined, this),
56220
- powerlineConfig.enabled && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Box_default, {
56221
- flexDirection: "column",
56222
- marginTop: 1,
56223
- children: /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
56224
- dimColor: true,
56225
- children: "When enabled, global overrides are disabled and powerline separators are used"
56226
- }, undefined, false, undefined, this)
56227
- }, undefined, false, undefined, this),
56275
+ powerlineConfig.enabled && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
56276
+ children: [
56277
+ /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Box_default, {
56278
+ children: [
56279
+ /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
56280
+ children: " Align Widgets: "
56281
+ }, undefined, false, undefined, this),
56282
+ /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
56283
+ color: powerlineConfig.autoAlign ? "green" : "red",
56284
+ children: powerlineConfig.autoAlign ? "✓ Enabled " : "✗ Disabled "
56285
+ }, undefined, false, undefined, this),
56286
+ /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
56287
+ dimColor: true,
56288
+ children: " - Press (a) to toggle"
56289
+ }, undefined, false, undefined, this)
56290
+ ]
56291
+ }, undefined, true, undefined, this),
56292
+ /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Box_default, {
56293
+ flexDirection: "column",
56294
+ marginTop: 1,
56295
+ children: /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
56296
+ dimColor: true,
56297
+ children: "When enabled, global overrides are disabled and powerline separators are used"
56298
+ }, undefined, false, undefined, this)
56299
+ }, undefined, false, undefined, this)
56300
+ ]
56301
+ }, undefined, true, undefined, this),
56228
56302
  /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Box_default, {
56229
56303
  marginTop: 1,
56230
56304
  flexDirection: "column",
@@ -56291,27 +56365,30 @@ var PowerlineSetup = ({
56291
56365
  // src/tui/components/StatusLinePreview.tsx
56292
56366
  var import_react42 = __toESM(require_react(), 1);
56293
56367
  var jsx_dev_runtime14 = __toESM(require_jsx_dev_runtime(), 1);
56294
- var renderSingleLine = (widgets, terminalWidth, widthDetectionAvailable, settings, lineIndex, globalSeparatorIndex) => {
56368
+ var renderSingleLine = (widgets, terminalWidth, widthDetectionAvailable, settings, lineIndex, globalSeparatorIndex, allLinesWidgets) => {
56295
56369
  const context = {
56296
56370
  terminalWidth,
56297
56371
  isPreview: true,
56298
56372
  lineIndex,
56299
56373
  globalSeparatorIndex
56300
56374
  };
56301
- return renderStatusLineWithInfo(widgets, settings, context);
56375
+ return renderStatusLineWithInfo(widgets, settings, context, allLinesWidgets);
56302
56376
  };
56303
56377
  var StatusLinePreview = ({ lines, terminalWidth, settings, onTruncationChange }) => {
56304
56378
  const widthDetectionAvailable = import_react42.default.useMemo(() => canDetectTerminalWidth(), []);
56305
56379
  const { renderedLines, anyTruncated } = import_react42.default.useMemo(() => {
56306
56380
  if (!settings)
56307
56381
  return { renderedLines: [], anyTruncated: false };
56382
+ const isPowerlineMode = settings.powerline.enabled;
56383
+ const autoAlign = settings.powerline.autoAlign;
56384
+ const allLinesWidgets = isPowerlineMode && autoAlign ? lines : undefined;
56308
56385
  let globalSeparatorIndex = 0;
56309
56386
  const result = [];
56310
56387
  let truncated = false;
56311
56388
  for (let i = 0;i < lines.length; i++) {
56312
56389
  const lineItems = lines[i];
56313
56390
  if (lineItems && lineItems.length > 0) {
56314
- const renderResult = renderSingleLine(lineItems, terminalWidth, widthDetectionAvailable, settings, i, globalSeparatorIndex);
56391
+ const renderResult = renderSingleLine(lineItems, terminalWidth, widthDetectionAvailable, settings, i, globalSeparatorIndex, allLinesWidgets);
56315
56392
  result.push(renderResult.line);
56316
56393
  if (renderResult.wasTruncated) {
56317
56394
  truncated = true;
@@ -58253,12 +58330,15 @@ async function renderMultipleLines(data) {
58253
58330
  blockMetrics,
58254
58331
  isPreview: false
58255
58332
  };
58333
+ const isPowerlineMode = settings.powerline.enabled;
58334
+ const autoAlign = settings.powerline.autoAlign;
58335
+ const allLinesWidgets = isPowerlineMode && autoAlign ? lines : undefined;
58256
58336
  let globalSeparatorIndex = 0;
58257
58337
  for (let i = 0;i < lines.length; i++) {
58258
58338
  const lineItems = lines[i];
58259
58339
  if (lineItems && lineItems.length > 0) {
58260
58340
  const lineContext = { ...context, lineIndex: i, globalSeparatorIndex };
58261
- const line = renderStatusLine(lineItems, settings, lineContext);
58341
+ const line = renderStatusLine(lineItems, settings, lineContext, allLinesWidgets);
58262
58342
  const strippedLine = line.replace(/\x1b\[[0-9;]*m/g, "").trim();
58263
58343
  if (strippedLine.length > 0) {
58264
58344
  const nonMergedWidgets = lineItems.filter((_, idx) => idx === lineItems.length - 1 || !lineItems[idx]?.merge);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccstatusline",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "A customizable status line formatter for Claude Code CLI",
5
5
  "module": "src/ccstatusline.ts",
6
6
  "type": "module",