Update swayidle-lock-screen
This commit is contained in:
parent
1a7c989632
commit
0f9e6d3324
@ -9,7 +9,7 @@ function run {
|
||||
flock -n 4 || exit 0
|
||||
dunstctl set-paused true
|
||||
swayidle -w -C /dev/null \
|
||||
timeout 15 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' &
|
||||
timeout 15 "${suspend_command}" resume "${wake_command}" &
|
||||
local swayidle_pid="${!}"
|
||||
swaylock -e ${img_flags}
|
||||
kill "${swayidle_pid}"
|
||||
@ -26,6 +26,8 @@ function fix_eww {
|
||||
}
|
||||
|
||||
local background=false
|
||||
local suspend_command='hyprctl dispatch dpms off'
|
||||
local wake_command='hyprctl dispatch dpms on'
|
||||
local fix_eww=()
|
||||
while [[ "${1}" =~ '^-' ]]; do
|
||||
case "${1}" in
|
||||
@ -40,6 +42,9 @@ while [[ "${1}" =~ '^-' ]]; do
|
||||
fix_eww+="${2}"
|
||||
shift
|
||||
;;
|
||||
-s)
|
||||
local suspend_command='sudo /usr/lib/systemd/systemd-sleep suspend &'
|
||||
;;
|
||||
-*)
|
||||
printf "error: unknown flag '%s'\n" "${1}" >&2
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user