Two things that were constants and had no business being constants. Placement: the box (left, centre, right) and the index within it. The default is unchanged -- centre, index 1, immediately right of the clock -- and an index past the end of a box lands at the end, so a large one means "last". Applied at once, no reload. Moving is done by rebuilding the indicator rather than by moving the actor. addToStatusArea is what registers it under the uuid and there is no documented call to move one between boxes; everything else reaches into Main.panel's private boxes. It costs one re-read of a few small state files and only when the setting is touched. Label width: three characters by default, settable up to ten, not down. Three is enough to keep initials apart and narrow enough not to shove the clock about; below three, distinct projects start sharing a label. A wider label takes more initials rather than a longer prefix -- a prefix collapses dev-skills and dev-conventions at any width -- so dev-skills stays "ds" however wide the setting, while claude-code-gnome-extension becomes "ccge" at four. A disambiguating digit still eats into the label instead of extending past the width, so a chip that gains one does not push the row. Sticky labels work against that setting: kept labels are kept whatever width they were cut at, so widening would leave every session on screen at its old width until it ended. The width is therefore the one thing that discards the map -- a relabelling that was asked for is not a label moving under your hand. The combo row is bound by hand: Gio.Settings.bind maps a boolean to 'active' and an int to 'value', but a string to a selected index needs bind_with_mapping, which is not introspectable. Only the write direction is wired up, and the test covers it, because a row that stores its index instead of its value looks fine until the shell reads the key. Fixed on the way, found by watching the centre box grow 2 -> 3 -> 4 -> 5 across four moves: PanelMenu.ButtonBox connects `this._onDestroy.bind(this)` in its _init, and its _onDestroy is what destroys the container -- the St.Bin the panel box actually holds. The name resolves through the prototype chain, so this extension's own _onDestroy had been silently replacing the shell's since the beginning, leaving an empty container in the panel on every teardown. Renamed to _teardown; the box now stays at two children across moves and across enable/disable cycles. Verified in a nested shell on a copy of the extension carrying temporary logging, since the shell refuses screenshots to non-portal callers: every box, indices 0, 1 and 9, and widths 3, 5, 8, 10 and back, with no JS errors and no leftover actors.
55 lines
3.4 KiB
XML
55 lines
3.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<schemalist>
|
|
<schema id="org.gnome.shell.extensions.claude-code-status"
|
|
path="/org/gnome/shell/extensions/claude-code-status/">
|
|
<key name="panel-box" type="s">
|
|
<choices>
|
|
<choice value="left"/>
|
|
<choice value="center"/>
|
|
<choice value="right"/>
|
|
</choices>
|
|
<default>'center'</default>
|
|
<summary>Which panel box the chips live in</summary>
|
|
<description>The centre box holds the clock and is the thing you already glance at, which is why the chips start there. The right box is the system's own state area; the left one sits after the activities button and the app menu.</description>
|
|
</key>
|
|
<key name="panel-position" type="i">
|
|
<default>1</default>
|
|
<range min="0" max="10"/>
|
|
<summary>Index within that box</summary>
|
|
<description>0 puts the chips first, before everything else in the box; the default of 1 puts them immediately right of the clock, the centre box's only other occupant. An index past the end of the box lands at the end.</description>
|
|
</key>
|
|
<key name="show-project-name" type="b">
|
|
<default>true</default>
|
|
<summary>Label each chip with its project</summary>
|
|
<description>Name the sessions, not just their states. With several running, the state alone does not say which terminal to go to. Turn off to leave only the state glyphs.</description>
|
|
</key>
|
|
<key name="abbreviate-names" type="b">
|
|
<default>true</default>
|
|
<summary>Shorten project names on the chips</summary>
|
|
<description>Chips show initials ("dev-skills" becomes "ds") so a row of sessions stays narrow. Sessions that would collide, including two in the same project, get a digit by seniority: the older one keeps its label. Turn off to show full project names.</description>
|
|
</key>
|
|
<key name="abbrev-length" type="i">
|
|
<default>3</default>
|
|
<range min="3" max="10"/>
|
|
<summary>How many characters a shortened label may use</summary>
|
|
<description>Three is enough to tell initials apart and narrow enough that a row of chips does not push the clock about. Longer labels read more like the project name; a disambiguating digit still eats into the label rather than extending past this width, so every chip stays the same size. Below three, distinct projects start sharing a label.</description>
|
|
</key>
|
|
<key name="max-chips" type="i">
|
|
<default>3</default>
|
|
<range min="1" max="12"/>
|
|
<summary>How many sessions get a chip</summary>
|
|
<description>Chips are ordered by urgency, so the ones shown are the ones that need you soonest; the rest are counted as "+N". Keeps the row from pushing the clock off centre when many sessions are open.</description>
|
|
</key>
|
|
<key name="show-age" type="b">
|
|
<default>true</default>
|
|
<summary>Show how long the session has been in this state</summary>
|
|
<description>How long a session has been working, or waiting, is what decides whether to switch to it now or leave it running.</description>
|
|
</key>
|
|
<key name="zellij-integration" type="b">
|
|
<default>true</default>
|
|
<summary>Resolve zellij tab names</summary>
|
|
<description>Look up which zellij tab each session runs in and name it in the menu, which answers "which terminal" better than a path does. Requires the zellij command; harmless when it is absent.</description>
|
|
</key>
|
|
</schema>
|
|
</schemalist>
|