mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-11-14 16:20:52 -05:00
16 lines
430 B
Bash
16 lines
430 B
Bash
#!/bin/bash
|
|
|
|
START_TIME=`date +"%b %d, %Y %T"`
|
|
LOG_FILE="${XDG_STATE_HOME}"/xidlehook.log
|
|
|
|
echo "--- ${START_TIME} ---" > "$LOG_FILE"
|
|
|
|
# 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
|
|
xidlehook \
|
|
--not-when-audio \
|
|
--not-when-fullscreen \
|
|
--timer 600 'xset s activate' '' \
|
|
2>&1 | tee -a "$LOG_FILE" & disown
|