Show one chip per session, right of the clock

The panel showed a single aggregate: the most urgent session, plus a "+N"
for the others. That answers "what is the worst thing happening", which
is not the question with five projects open -- "what is each of them
doing" needs each of them on screen.

Each session now gets a chip: state glyph plus a three-character project
label, in the centre box just right of the clock. Time in state stays on
the first chip only; five counters side by side are a row of numbers,
not an answer.

Labels are initials for multi-segment names, first letters otherwise.
Initials rather than a prefix, because a prefix collapses dev-skills and
dev-conventions onto the same "dev" -- exactly the pair that has to stay
apart. Collisions, including two sessions in one project where the cwd
is identical, take a digit: ds, ds2, ds3.

Two rules keep a label still, and the feature is worthless without them.
Assignment runs oldest-session-first, so a session starting now takes
the suffix instead of displacing one already on screen; and a label
belongs to its session until it ends, even after whatever forced the
digit has closed. A label that moves under your hand is worse than one
carrying a digit that no longer looks necessary.

The zellij tab name was considered as the label source and dropped. It
arrives asynchronously from dump-layout, so a sticky label would freeze
whatever the project name produced first and never adopt it. Digits
already separate same-project sessions, so the tab name buys nothing
here and stays where it is useful, in the menu.

Menu rows now lead with the same label, so the mapping from "ds" to
dev-skills is read rather than guessed.
This commit is contained in:
av
2026-08-09 18:45:44 +03:00
parent 58409106c3
commit a4e5d653de
8 changed files with 381 additions and 116 deletions
@@ -4,8 +4,13 @@
path="/org/gnome/shell/extensions/claude-code-status/">
<key name="show-project-name" type="b">
<default>true</default>
<summary>Show the project name in the panel</summary>
<description>Name the session that needs attention, not just its state. With several sessions running, the state alone does not say which terminal to go to.</description>
<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 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="show-age" type="b">
<default>true</default>