Cap the chips at three, and make the menu report-only
Two changes that pull in the same direction: the panel says less, and the menu stops pretending to do anything. The chip row had no bound. It sits in the centre box next to the clock, so enough open sessions would have shoved the clock off centre. It now shows the first N, settable and three by default, and counts the rest as "+N". Chips are already ordered by urgency, so the ones that survive the cut are the ones that need you soonest. Labels are still assigned across every session, including hidden ones, so a chip does not change when the cap does or when a session ahead of it disappears. Clicking a menu row used to switch the zellij tab and raise a terminal. That is gone. It cost real machinery for what it saved -- gnome-terminal runs every window under one shared server process, so windows cannot be matched by pid and the code fell back to matching the zellij session name against window titles, with all the ways that misses. The menu reports status; alt-tab is not the bottleneck. Rows are built inert rather than demoted after the fact, because PopupBaseMenuItem latches _activatable in its constructor. zellij tab lookup stays: naming the tab is the better half of that feature and costs one process every couple of minutes. The preferences test now asserts a control per settings key rather than a switch per key, so the new spin row counts and a future non-boolean setting cannot slip in without one.
This commit is contained in:
@@ -12,6 +12,12 @@
|
||||
<summary>Shorten project names to three characters</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="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>
|
||||
@@ -20,7 +26,7 @@
|
||||
<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, show it in the menu, and let a click switch to that tab. Requires the zellij command; harmless when it is absent.</description>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user