1#!/usr/bin/env bash 2 3pkill -x swayidle 4 5swayidle -w\ 6 lock '@locker@'\ 7 timeout 120 "notify-send 'going to sleep soon!' -t 3000"\ 8 timeout 180 '@wmmsg@ "output * dpms off"'\ 9 resume '@wmmsg@ "output * dpms on"'\ 10 timeout 240 'loginctl lock-session'\ 11 timeout 300 'systemctl suspend-then-hibernate'\ 12 resume 'timewall set'\ 13 before-sleep 'playerctl -a pause; loginctl lock-session'