Fix swayidle-lock-screen
This commit is contained in:
parent
dc331da167
commit
fa002c5ceb
@ -1,8 +1,16 @@
|
||||
#!/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
|
||||
function run {
|
||||
swayidle -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
|
||||
}
|
||||
|
||||
if [[ "${1}" == '-f' ]]; then
|
||||
run &
|
||||
else
|
||||
run
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user