[sway/lock] use physlock only if available

This commit is contained in:
Felix Buehler 2019-10-30 11:50:52 +01:00
parent 5428a1a166
commit 0bea48b8b6

View file

@ -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% {} {}
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[@]}"