Update swayidle-lock-screen

This commit is contained in:
Alexander Rosenberg 2023-10-05 22:38:52 -07:00
parent 7a4643a25e
commit 5c497e5390
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -1,12 +1,14 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
function run { function run {
dunstctl set-paused true
swayidle -w -C /dev/null \ swayidle -w -C /dev/null \
timeout 15 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' & timeout 15 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' &
local swayidle_pid="${!}" local swayidle_pid="${!}"
swaylock -e "${@}" swaylock -e "${@}"
kill "${swayidle_pid}" kill "${swayidle_pid}"
hyprctl dispatch dpms on hyprctl dispatch dpms on
dunstctl set-paused false
} }
local background=false local background=false