dotfiles/dot_local/bin/executable_xidlehook-desktop

10 lines
346 B
Bash

#!/bin/bash
# Wait on pipewire or "--not-when-audio" will break everything
until pgrep -u $UID -x pipewire-pulse >/dev/null; do sleep 1; done
# lock screen after 10 minutes
echo "---" | tee -a /tmp/xidlehook.log
xidlehook --not-when-audio --not-when-fullscreen \
--timer 600 "xset s activate" "" \
2>&1 | tee -a /tmp/xidlehook.log & disown