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.
30 lines
1.1 KiB
Clojure
30 lines
1.1 KiB
Clojure
{
|
|
:paths ["src"]
|
|
:deps {
|
|
;; All dependencies are now built into Babashka:
|
|
;; - babashka.process (for shell commands)
|
|
;; - clojure.core.async (for concurrency)
|
|
;; - clojure.tools.cli (for CLI parsing)
|
|
;; - cheshire.core (for JSON)
|
|
;;
|
|
;; This script no longer requires any external dependencies!
|
|
}
|
|
:aliases {
|
|
;; For running with regular Clojure (if needed for development):
|
|
:jvm {
|
|
:extra-deps {
|
|
org.clojure/clojure { :mvn/version "1.12.3" }
|
|
org.clojure/core.async { :mvn/version "1.8.741" }
|
|
org.clojure/tools.cli { :mvn/version "1.3.250" }
|
|
}
|
|
}
|
|
:test {
|
|
:extra-paths ["test"]
|
|
:extra-deps {
|
|
eftest/eftest {:mvn/version "0.6.0"}
|
|
}
|
|
:main-opts ["-e" "(require '[eftest.runner :refer [find-tests run-tests]]) (run-tests (find-tests \"test\"))"]
|
|
}
|
|
}
|
|
}
|