enable/disable swayidle

This commit is contained in:
Morgan McMillian 2021-01-03 07:47:36 -08:00
parent 8b94555c34
commit 2049dd3f7b
2 changed files with 14 additions and 0 deletions

12
bin/idle Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
BACKGROUND=~/.background_lock
LOCK_TMOUT=900
SLEEP_TMOUT=3600
swayidle -w \
timeout ${LOCK_TMOUT} "swaylock -f -i ${BACKGROUND}" \
timeout ${SLEEP_TMOUT} 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep "swaylock -f -i ${BACKGROUND}" &

2
bin/noidle Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
pkill swayidle