diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-10 13:06:18 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-10 13:06:18 +0100 |
| commit | ea5a277c6b8bb2ba48b0ca8822797cf6ab0b3405 (patch) | |
| tree | d2ce1c0fe156dcd9c53196c151bdfed091a25618 /AGENTS.md | |
| parent | 8ec2352c22780202fcd39982f1c3e65d2dae0cc1 (diff) | |
| download | deck-it-ea5a277c6b8bb2ba48b0ca8822797cf6ab0b3405.tar.gz deck-it-ea5a277c6b8bb2ba48b0ca8822797cf6ab0b3405.zip | |
feat: the PC tells the tablet it is going to sleep
deckit/sleep.py holds an elogind delay inhibitor and watches
PrepareForSleep with dbus-monitor. On a suspend the server marks its
answers with X-Deckit-Sleep for 2 s, so the tablet's next poll shows "The
PC is asleep" at once and drops its wake lock, then lets the inhibitor go.
On resume it takes the inhibitor again. The 15 s silence fallback stays,
worded "The PC is not answering", for a crash or a dropped tunnel.
The inhibitor's command is `tail --pid=<server>` and dbus-monitor has a
parent-death signal, so a killed server leaves no lock delaying every
suspend (checked with kill -9: both gone within 2 s).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -64,9 +64,11 @@ Keep the server dependency-free apart from that one package. (vendored `marked`, HTML escaped, images never fetched). - The page holds a Screen Wake Lock while visible, so the tablet never sleeps over the dashboard; nothing on the tablet's settings is changed. - After 15s with no answer from the server (the PC asleep, or deck-it - gone) `app.js` covers the page with a "The PC is asleep" overlay and - drops the lock, so the tablet sleeps too; the first answer takes both back. + Before a suspend `deckit/sleep.py` (an elogind delay inhibitor plus + `dbus-monitor` on PrepareForSleep) marks answers with `X-Deckit-Sleep` for + 2s, and `app.js` covers the page with "The PC is asleep" and drops the + lock, so the tablet sleeps too; 15s with no answer at all gives the same + overlay as "The PC is not answering". The first plain answer takes both back. - Launchers are `[launch] apps`, desktop ids run with `gtk-launch`; label and icon come from the `.desktop` file. The client sends the id, which must be configured and installed. |
