Answers one question at a glance: is any session waiting for me, and
which one. With several sessions open the cost is not knowing what each
is doing, it is noticing that one stopped an hour ago.
Claude Code hooks write one JSON file per session under
~/.local/state/claude-code-status; the extension watches the directory
with Gio.FileMonitor, so nothing polls and there is no daemon.
Two distinctions carry the design:
* blocked (permission prompt) is kept apart from waiting (turn done).
Merged, a finished task looks as urgent as a stuck one, which is
exactly the judgement the indicator exists to make.
* the panel names the oldest session in the top state, not the latest.
The session you forget is the one that has been waiting longest.
PostToolUse is registered although it looks redundant: it is the only
event that fires after a permission is granted, so without it a session
stays blocked in the panel for the rest of the turn. It writes only on
an actual state change, so the usual case costs no I/O.
Stop and SessionEnd are synchronous, unlike the rest. Both fire as the
process is about to go quiet, and an async hook racing that exit gets
killed before it writes -- claude -p left a session pinned at busy.
Concurrent hooks for one session serialise on an flock plus a timestamp
guard; tests/test-hook.sh covers each separately, because the burst test
passes on the timestamp guard alone.
Sessions running in zellij are located by tab name rather than by path,
matched through dump-layout on the working directory. The dump carries
no pane ids, so ZELLIJ_PANE_ID cannot be used; rows that do not resolve
stay inert instead of pretending a click does something.
lib/sessions.js deliberately imports nothing from the shell resource
namespace, which lets the riskiest logic -- liveness, ordering, partial
reads, monitoring -- run under plain gjs in tests/test-sessions.js.
27 lines
1.4 KiB
XML
27 lines
1.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="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>
|
|
</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="hide-when-idle" type="b">
|
|
<default>false</default>
|
|
<summary>Hide the indicator when nothing is running</summary>
|
|
<description>Remove the indicator from the panel while there are no sessions, or all of them are idle.</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, show it in the menu, and let a click switch to that tab. Requires the zellij command; harmless when it is absent.</description>
|
|
</key>
|
|
</schema>
|
|
</schemalist>
|