mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-05 12:49:12 +01:00
Close the loop on Sleep Mode v1. The web-app side (Moon toggle in /control) already writes /tmp/cockpit-sleep-mode via POST /api/control/sleep-mode and short-circuits the ReadyBanner countdown to 0 in the browser. The local stop hook was still launching the popup regardless — so a user who flipped sleep mode and closed the lid would come back to a stale popup. Adds a single check between the popup-mode and min-idle gates: if the sentinel exists, log + exit 0 (matching the existing 'disabled' semantic). The browser-side ReadyBanner continues to auto-inject as long as Cockpit is open in any tab — no other change needed for the loop to close. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>