scripts/i3/screensaver.sh

25 lines
661 B
Bash
Executable File

#!/usr/bin/env bash
# Only exported variables can be used within the timer's command.
#export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')"
# Run xidlehook
xidlehook \
--not-when-fullscreen \
--not-when-audio \
--timer 180 \
'notify-send -u low "Locking in 15 seconds..."' \
'' \
--timer 15 \
'xset dpms force off' \
'xset dpms force on'
# --timer 300 \
# 'systemctl suspend' \
# ''
# --timer 15 \
# 'loginctl lock-session' \
# '' \
# --timer 15 \
# 'i3lock -k -i /usr/share/backgrounds/archlinux/wave.png --timecolor FFFFFF --datecolor FFFFFF --ignore-empty-password --show-failed-attempts -C' \
# '' \