From 0bea48b8b685b279cd5e24478d21bddb2ae7418a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 30 Oct 2019 11:50:52 +0100 Subject: [PATCH] [sway/lock] use physlock only if available --- sway/lock.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sway/lock.sh b/sway/lock.sh index 1fc5e48..a1ecd34 100755 --- a/sway/lock.sh +++ b/sway/lock.sh @@ -14,7 +14,12 @@ done printf '%s\n' "${images[@]}" | xargs -P 0 -I{} convert -resize 20% -level 0%,100%,0.9 -blur 0x2 -resize 500% {} {} -physlock -l prevent tty switching -swaylock "${swaylock_args[@]}" -s center -physlock -L reenable tty switching +if command -v physlock 2>/dev/null; then + physlock -l prevent tty switching + swaylock "${swaylock_args[@]}" -s center + physlock -L reenable tty switching +else + swaylock "${swaylock_args[@]}" -s center +fi + rm "${images[@]}"