Replace heavyweight JVM Clojure with Babashka for instant startup and simplicity. The script now uses mosquitto_pub CLI tool instead of the Java MQTT client library. Key improvements: - Use systemd-logind for idle detection (works with X11 and Wayland) - Fallback to xprintidle for legacy X11-only systems - Replace Paho MQTT client with mosquitto_pub CLI - Eliminate all external dependencies (use Babashka built-ins) - Add shebang for direct execution - Fix compatibility with NixOS 25.11 and modern Wayland systems This resolves the 'screen saver extension not supported' error by using loginctl to query systemd-logind instead of relying on X11 extensions.
Description
Simple job to notify an MQTT topic when a user is active on a host.
Intended for use with Home Assistant, to watch for presence on a host.
Run as a user systemd job.
Languages
Clojure
63.9%
Nix
36.1%