Fix swayidle-lock-screen

This commit is contained in:
Alexander Rosenberg 2023-09-10 03:26:19 -07:00
parent dc331da167
commit fa002c5ceb
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -1,8 +1,16 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
swayidle -d -w -C /dev/null \ function run {
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 swaylock
kill "${swayidle_pid}" kill "${swayidle_pid}"
hyprctl dispatch dpms on hyprctl dispatch dpms on
}
if [[ "${1}" == '-f' ]]; then
run &
else
run
fi