12 lines
289 B
Bash
Executable file
12 lines
289 B
Bash
Executable file
#!/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}" &
|
|
|