mirror of
https://github.com/Kynde/dais.git
synced 2026-10-20 08:32:28 +02:00
The daemon watches logind's PrepareForSleep on the system bus (a dbus-monitor subprocess, argv vector like the ear) and forces voice-off on BOTH edges: at the sleep edge, and re-checked at resume — the pre-sleep write races the freeze since no delay inhibitor is held, so resume is the guarantee that opening the lid never resumes listening. Only acts (and notifies "Voice off · suspending") when the mic was open; an already-closed mic stays silent. A latch recording in flight is discarded, not transcribed — same "off means OFF" rule as a deliberate stop. The line fold (sleep-edge) is pure and tested; the daemon runs fine without dbus-monitor (stderr note, watch disabled). Deliberately not configurable.