swayidle user service for openrc
0
swayidle
1#!/sbin/openrc-run
2
3command=/usr/bin/swayidle
4command_args="-w timeout 601 'niri msg action power-off-monitors' timeout 600 'qs -c noctalia-shell ipc call lockScreen lock' before-sleep 'qs -c noctalia-shell ipc call lockScreen lock'"
5command_background="yes"
6pidfile="${XDG_RUNTIME_DIR}/${RC_SVCNAME}.pid"
7
8start_pre() {
9 if [ -z "$WAYLAND_DISPLAY" ]; then
10 eerror "$WAYLAND_DISPLAY unset, can't proceed."
11 return 1
12 fi
13}