From 660f6b0ca6f2cc2a9747c38b87aa205fcc7b125a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 24 Dec 2022 16:41:45 +0100 Subject: [PATCH] wayland: Fix suspend input locking after timeout This commit fixes input locking when suspend was invoked autoatically after a certain amount of time. Previously, it would invoke the lockscreen first, then dim the screen and finally suspend the machine. While suspending it would invoke the lockscreen *again* however, which seems to lead to generally locking input (perhaps 2 instances of waylock disable each others' input ability?). This change checks for a running lockscreen first before invoking another one, which should hopefully fix the issue. --- wayland/.config/river/init | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wayland/.config/river/init b/wayland/.config/river/init index 81ec6b6..65e2300 100755 --- a/wayland/.config/river/init +++ b/wayland/.config/river/init @@ -250,12 +250,12 @@ exec kanshi & # start screen idle locking/dimming/sleep tool killall swayidle exec swayidle \ - timeout "${time_to_lockscreen}" 'lockscreen' \ + timeout "${time_to_lockscreen}" 'pidof waylock || lockscreen' \ timeout "${time_to_screendim}" 'wlopm --off "*"' \ timeout "${time_to_suspend}" 'systemctl suspend-then-hibernate' \ - resume 'wlopm --on "*"' \ - after-resume 'wlopm --on "*"' \ - before-sleep 'lockscreen' & + resume 'wlopm --on "*"' \ + after-resume 'wlopm --on "*"' \ + before-sleep 'pidof waylock || lockscreen' & killall clipman exec wl-paste -t text --watch clipman store &