enable/disable swayidle
This commit is contained in:
parent
8b94555c34
commit
2049dd3f7b
2 changed files with 14 additions and 0 deletions
12
bin/idle
Executable file
12
bin/idle
Executable 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
2
bin/noidle
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
pkill swayidle
|
Loading…
Reference in a new issue