random-scripts/swayidle-lock-screen

9 lines
210 B
Bash
Executable File

#!/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