sway: update suspend script

This commit is contained in:
lelgenio 2022-02-14 20:59:10 -03:00
parent 7102da428e
commit bfcd21e3b4
3 changed files with 10 additions and 3 deletions

7
dotfiles/scripts/_suspend Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
swaylock
loginctl suspend
systemctl suspend
sudo -A zzz

View File

@ -3,8 +3,8 @@
pkill -9 swayidle
exec swayidle -w \
before-sleep 'pkill caffeinated; swaylock -f' \
timeout 360 'pkill caffeinated; swaylock -f' \
before-sleep 'swaylock -f' \
timeout 360 'swaylock -f' \
timeout 1800 'mpc status | grep "^\[playing\]" > /dev/null ||
swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \

View File

@ -38,7 +38,7 @@ $mod+p exec wpass
$mod+Shift+c reload
# Lock Sway and suspend
--locked $mod+Control+z exec loginctl suspend || systemctl suspend
--locked $mod+Control+z exec _suspend
# Exit sway
Control+Alt+delete exec pkill -u "$USER" -HUP runsvdir ; exit