Add -e flag to swayidle-lock-screen

This commit is contained in:
Alexander Rosenberg 2024-03-20 09:24:42 -07:00
parent e30b1ecaff
commit 08463ec120
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -11,7 +11,7 @@ function run {
swayidle -w -C /dev/null \ swayidle -w -C /dev/null \
timeout 15 "${suspend_command}" resume "${wake_command}" & timeout 15 "${suspend_command}" resume "${wake_command}" &
local swayidle_pid="${!}" local swayidle_pid="${!}"
swaylock -e ${img_flags} swaylock ${empty_flag} ${img_flags}
kill "${swayidle_pid}" kill "${swayidle_pid}"
hyprctl dispatch dpms on hyprctl dispatch dpms on
dunstctl set-paused false dunstctl set-paused false
@ -28,6 +28,7 @@ function fix_eww {
local background=false local background=false
local suspend_command='hyprctl dispatch dpms off' local suspend_command='hyprctl dispatch dpms off'
local wake_command='hyprctl dispatch dpms on' local wake_command='hyprctl dispatch dpms on'
local empty_flag=''
local fix_eww=() local fix_eww=()
while [[ "${1}" =~ '^-' ]]; do while [[ "${1}" =~ '^-' ]]; do
case "${1}" in case "${1}" in
@ -45,6 +46,9 @@ while [[ "${1}" =~ '^-' ]]; do
-s) -s)
local suspend_command='sudo /usr/lib/systemd/systemd-sleep suspend &' local suspend_command='sudo /usr/lib/systemd/systemd-sleep suspend &'
;; ;;
-e)
empty_flag='-e'
;;
-*) -*)
printf "error: unknown flag '%s'\n" "${1}" >&2 printf "error: unknown flag '%s'\n" "${1}" >&2
;; ;;