| Age | Commit message (Collapse) | Author | Files | Lines |
|
The auto-detector now sets presentation while Teams holds a mic stream,
alongside the game checks. Teams runs for the whole session, so its
process alone is no signal and would have kept lock, DND and the
breaktimer off all day. A call is Teams holding a source-output, which
pactl lists tagged with application.process.binary = "teams-for-linux";
verified matching during a live call.
It reuses status.gaming rather than status.presentation, so a call
ending clears only the automatic half and never a manual toggle. The
statusctl tooltip for that state said "game running", which is now
wrong, so it reads "auto: game or call". The file and waybar class keep
the gaming name: renaming them touches four places for no behaviour
change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
PCSX2 joins gamescope, Steam and DuckStation in the game detector, so
presentation is set automatically while a PS2 game runs and the idle
lock, DND and breaktimer stay out of the way.
The binary is /usr/bin/pcsx2-qt, the same -qt shape as duckstation-qt,
so it takes the same pgrep -x exact name match and cannot self-match the
way the bracketed steam pattern has to guard against.
Verified against the real emulator rather than a stand-in: with
pcsx2-qt running, status.gaming reads 1.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Game detection probed only gamescope and Steam, so a standalone
DuckStation session never turned presentation on. Add a third probe for
the duckstation-qt process.
pgrep -x rather than the bracketed pgrep -f the Steam path needs: this
is an exact match on the process name, so it cannot match the sh running
the check, and the binary name is under the 15 character comm limit so
it is not truncated.
|
|
Presentation is worth having automatically while a game runs: it is a
fullscreen app that already holds the screen, and the idle lock, DND and
breaktimer are all unwanted during it.
Detection is a 5s poll for a gamescope process or a Steam game binary,
either one enough. The Steam pattern is bracketed so pgrep -f cannot match
the sh running the check and report a game forever.
The result goes to its own status.gaming file, and presentation becomes the
OR of it and status.presentation. That separation is the point: a game
ending clears only the gaming half, so a presentation set by hand survives
a game session instead of being clobbered on exit.
|
|
breaktimer.sh's pause and resume arms write the state file whether or not
a daemon is running, so statusctl presentation set while the daemon was
stopped recorded a phantom paused/running state and the tile then showed
Paused or a frozen countdown for a daemon that does not exist. Gate both
verbs on btRunning, the singleton's running-or-paused derived state, so a
verb is only sent when a daemon actually exists.
|
|
The daemon already publishes these three files under XDG_RUNTIME_DIR and
waybar already consumes them, so a second consumer costs three FileViews and
invents no interface.
Read only, deliberately. The daemon loop rewrites state and phase on every
transition, so a second writer would race it, which is why presentation mode
has always called a verb rather than writing the file.
The countdown does not interpolate between the daemon's five second writes: a
local clock would drift against it and keep ticking while the daemon is frozen
outside the work window.
|
|
dnd and presentation were the only modes, and presentation was the sole
holder of the Wayland idle inhibitor. That inhibitor is the only thing
that stops hypridle's loginctl lock-session at the 600s timeout, so
screen locking is on by default and there was no way to turn it off on
its own.
nolock is stored as "auto-lock disabled" so the file keeps the registry's
"missing means off" rule, and the row inverts it so the switch reads as
the default: lock on. Presentation now drives nolock the same way it
drives dnd, holding the prior value in memory and restoring it on exit,
so it needs no second inhibitor and the inhibitor has a single holder.
The page sets the disable permanently or for a number of minutes. The
deadline and its timer live in the singleton rather than the row because
the drawer page is destroyed on close while the effect has to outlive
it. The timer is shell-lifetime, the same class of limit as
dndBeforePresentation: a restart during a timed disable leaves the lock
off until it is toggled, which is safe because the user opted into the
disable.
The mode governs idle-triggered locking only. The SUPER+l bind and the
lock on suspend are separate paths and stay live.
|
|
F1: after a click the shared Switch writes checked directly, dropping
StatusRow's declarative binding, so an external mode change from waybar
or statusctl no longer moved the switch. Resync via onValueChanged.
F2: the spec claimed hyprctl clients counts idle inhibitors, which is
false for a layer-surface inhibitor; replace with the behavioral
hypridle marker check.
F3: README said the check covers both watch states; it exercises the
activated report and the absent-file down report.
F4: give breakProc an onExited check so a failed breaktimer.sh verb is
visible instead of silent.
F5: drop StatusTile's unused required st property and its injection.
F6: comment the startup-order limit on dndBeforePresentation.
|
|
Presentation mode sets DND, asserts a Wayland idle inhibitor and pauses
breaktimer. The effects hang off the mode property rather than the setter,
so a mode set with statusctl while the drawer is closed asserts them too.
DND has two writers once presentation mode exists, so turning presentation
off restores the value DND had before rather than clearing it, or an
afternoon of hand-set DND would vanish when a talk ends. That prior value
lives in the singleton, not in a file: it means nothing once presentation
mode is off, and presentation mode does not survive a reboot.
breaktimer owns its own state file and is driven only through its verbs.
Two writers on that file would race with its daemon loop.
|
|
Modes live as files under XDG_RUNTIME_DIR, one per mode, holding 0 or 1,
with a missing file meaning off. That directory is tmpfs, so a reboot
resets every mode and no cleanup code is needed.
FileView covers both directions: atomicWrites for the write, watchChanges
for the watch, so an external writer repaints the drawer with no polling.
Both are already the documented defaults in 0.3.1 and are set explicitly
anyway, because statusctl watches close_write,moved_to precisely because an
atomic write lands as a rename. A future release flipping either default
would break the watcher with no error, and a declaration is a stronger
guarantee than a default.
The documented behaviour is that a FileView fires its own fileChanged on
setText, so the reparse compares before assigning and a self-write is a
no-op rather than a loop. That has not been observed running yet: nothing
consumes the singleton until the status module exists, so the guard stays
unproven until then.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A7ThHHh5iTYbVfp3rNAkw2
|