diff options
Diffstat (limited to 'desktop/modules/status/README.md')
| -rw-r--r-- | desktop/modules/status/README.md | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/desktop/modules/status/README.md b/desktop/modules/status/README.md index ea069d6..15bb122 100644 --- a/desktop/modules/status/README.md +++ b/desktop/modules/status/README.md @@ -1,9 +1,10 @@ # status -Desktop modes as state: `dnd`, `presentation`, `nolock` and `quiet`, owned by -the `Status` singleton and stored as files under `$XDG_RUNTIME_DIR`. A fifth, -`status.gaming`, is written only by the shell's game detector; it is not a -mode `statusctl` exposes. +Desktop modes as state: `dnd`, `presentation`, `nolock`, `quiet` and `nolamp`, owned by +the `Status` singleton and stored as files under `$XDG_RUNTIME_DIR`. Two more, +`status.gaming`, written only by the shell's game detector, and `status.xbox`, +written only by deck-it while the Xbox runs a game, are not modes `statusctl` +exposes; either one turns presentation on. ## The files are the interface @@ -11,7 +12,9 @@ mode `statusctl` exposes. $XDG_RUNTIME_DIR/status.presentation $XDG_RUNTIME_DIR/status.nolock $XDG_RUNTIME_DIR/status.quiet + $XDG_RUNTIME_DIR/status.nolamp $XDG_RUNTIME_DIR/status.gaming + $XDG_RUNTIME_DIR/status.xbox Each holds `0` or `1`; a missing file means off. That directory is tmpfs, so a reboot resets every mode and there is no cleanup code. A shell restart does @@ -63,7 +66,7 @@ asks `statusctl quiet get` and plays nothing on a 1. `~/bin/notify-sound` is a symlink to the repo copy, like `statusctl`. notify-sound claude Claude Code's Notification hook - notify-sound <event> opencode-notifier's command hook + notify-sound <event> <session> opencode-notifier's command hook The opencode notifier runs its command for every event, `session_started` and `user_message` included, so an argument with no sound plays nothing; only @@ -71,6 +74,12 @@ The opencode notifier runs its command for every event, `session_started` and are off in `opencode-notifier.json`, and it rereads that file on every event, so neither change needs an opencode restart. +`nolamp` keeps the agent lamp (the sibling agent-lamp repo) dark. The shell +does nothing with it: agent-lamp's renderer reads the file each second and +restores the bulb while it is 1, keeping the agents' states for when it +turns off. `notify-sound` forwards the opencode notifier's two arguments +(`<event> <session>`) to `agent-lamp`, before the quiet check. + ## Game detection Presentation is set automatically while a game runs, so a fullscreen game does @@ -110,8 +119,9 @@ without touching the manual half, so a bar widget would otherwise read class with its own icon, and `toggle` is refused while it holds: the detector reasserts the file within its poll, so the write would not stick. `set` is still allowed, since the manual half is worth setting for when the game exits. -The watch therefore follows `status.gaming` as well as its own file, and emits -only on a real change so an unchanged rewrite draws nothing. +The watch therefore follows `status.gaming` and `status.xbox` as well as its +own file, and emits only on a real change so an unchanged rewrite draws +nothing. `status.xbox` counts as gaming in all of this. ## The checks |
