diff options
Diffstat (limited to 'desktop/modules/status/README.md')
| -rw-r--r-- | desktop/modules/status/README.md | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/desktop/modules/status/README.md b/desktop/modules/status/README.md index d3d0cce..ea069d6 100644 --- a/desktop/modules/status/README.md +++ b/desktop/modules/status/README.md @@ -45,7 +45,7 @@ and reasserted when it returns. `dnd` has none of its own. It is state the notification daemon reads. `presentation` sets `dnd`, `nolock` and `quiet`, asserts a Wayland idle -inhibitor, and pauses breaktimer. Turning it off restores the three to the +inhibitor. Turning it off restores the three to the values they had before rather than clearing them, so hand-set DND or a hand-set disable survives a presentation. @@ -71,52 +71,10 @@ 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. -breaktimer is paused and resumed by verb, never by writing its state file. See -Breaktimer below, which is also the read direction. - -## Breaktimer - -The traffic runs both ways, and only one way writes. - -**Reading.** The daemon publishes three files the singleton watches: - - $XDG_RUNTIME_DIR/breaktimer.state running | paused | stopped - $XDG_RUNTIME_DIR/breaktimer.phase working | breaking | longbreak | stopped - $XDG_RUNTIME_DIR/breaktimer.remain seconds left in the phase - -exposed as `Status.btState`, `btPhase` and `btRemain`, with `btRunning` and -`btPaused` derived from the first. The old bar script read the same three -files; the two consumers never knew about each other. - -**Writing: never.** The daemon owns those files and rewrites state and phase on -every transition, so a second writer would race its loop. Every control calls a -verb through `runBreaktimer()`, which is why presentation mode has always -called `pause` rather than writing `breaktimer.state`. - -**A stopped daemon** is read from the state file, not probed. Both paths that -end the daemon write `stopped` there: `stop_daemon`, and the `cleanup` trap on -`TERM`. A daemon lost to `KILL` leaves a stale `running` and the drawer shows a -frozen countdown, a visible wrong answer the Start button resolves, which is -cheaper than a liveness probe on every repaint. QML cannot send a signal, so -the `kill -0` check the old bar module used is not available here anyway. - -**The countdown counts in five second steps**, because that is the daemon's -tick and the shell does not interpolate between its writes. A local one second -timer would be a second clock drifting against the first, correcting itself -with a visible jump every five seconds, and it would keep counting while the -daemon is frozen outside the work window or paused. - -**The tile** shows breaktimer below every mode, so an active mode still owns -the line and breaktimer replaces only the idle `All clear`. It does not count -toward `activeCount`: a running daemon is not a mode the user switched on. - -The daemon's own configuration lives in `~/.config/breaktimer.conf` and is not -edited from here; `breaktimer.sh config` prints what is in effect. - ## Game detection Presentation is set automatically while a game runs, so a fullscreen game does -not get locked or interrupted by the idle timer, DND or breaktimer. The shell +not get locked or interrupted by the idle timer or DND. The shell polls every five seconds for a `gamescope` process, a running Steam binary, or the DuckStation or PCSX2 emulators, and any one is enough: |
