The XScreenSaver extension is unavailable on this machine's X11 display.
Add /dev/pts youngest-atime as a fallback: the most recently accessed
pseudo-terminal is a reliable proxy for 'user is active in a terminal'
and needs no extra packages or group membership.
Detection order: libXss (XScreenSaver) → /dev/pts atime → 9999 (show beacon).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three targeted fixes for the "prompt injection even when at keyboard" problem:
1. Remove the `choice="1"` fallback — when the beacon times out or Chrome fails
to open, the hook now exits cleanly instead of auto-injecting slot 1 on top of
whatever the user typed manually.
2. X11 idle gate — skip beacon entirely when the user has been active within the
last 60 s (uses xprintidle if installed, falls back to libXss via ctypes, falls
back to 9999 = always show beacon when neither is available). Install
xprintidle with `sudo apt install xprintidle` to enable on systems without the
MIT-SCREEN-SAVER X11 extension.
3. Instant notify-send notification fires before Chrome launches so the user gets
immediate visual feedback while the browser beacon popup loads (1–4 s on first
Chrome launch, near-instant when Chrome is already running).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>