[sway] update lock.sh due to shellcheck

This commit is contained in:
Felix Buehler 2019-04-28 18:59:35 +02:00
parent 08de0874b5
commit 869ca2255e

View file

@ -6,15 +6,15 @@ swaylock_args=()
swaylock_args+=(-e) swaylock_args+=(-e)
for output in $(swaymsg -t get_outputs | jq -r '.[] .name'); do for output in $(swaymsg -t get_outputs | jq -r '.[] .name'); do
image=$(mktemp --suffix=.png) image=$(mktemp --suffix=.png)
images+=($image) images+=("$image")
swaylock_args+=(-i $output:$image) swaylock_args+=(-i "$output":"$image")
grim -o $output $image grim -o "$output" "$image"
done done
printf '%s\n' "${images[@]}" | xargs -P 0 -I{} convert -resize 20% -level 0%,100%,0.9 -blur 0x2 -resize 500% {} {} 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 physlock -l prevent tty switching
swaylock ${swaylock_args[@]} -s center swaylock "${swaylock_args[@]}" -s center
physlock -L reenable tty switching physlock -L reenable tty switching
rm ${images[@]} rm "${images[@]}"