random-scripts/swayidle-lock-screen

9 lines
210 B
Plaintext
Raw Normal View History

2023-09-10 03:11:44 -07:00
#!/usr/bin/env zsh
swayidle -d -w -C /dev/null \
timeout 15 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' &
local swayidle_pid="$!"
swaylock
kill "${swayidle_pid}"
hyprctl dispatch dpms on