summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lock10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/lock b/bin/lock
index eee8707..7aee163 100755
--- a/bin/lock
+++ b/bin/lock
@@ -21,9 +21,19 @@ if swaylock --help 2>&1 | grep -q effect; then
 		--timestr '%H:%M' --datestr '%F'
 		#--grace 2 --grace-no-mouse --grace-no-touch
 	)
+else
+	vf="scale=h=500:w=-1,boxblur=9:4"
+	for o in $(swq list output | jq -r '.[].name' | grep -v i3); do
+		i="/tmp/lock-$o.png"
+		rm "$i" || true
+		grim -o "$o" - | ffmpeg -v error -i - -vf "$vf" "$i"
+		images+=("$o":"$i")
+	done
+	fx_args=(--image="${images[@]}")
 fi
 
 for sh in "${HOME}"/.local/share/lock.d/*.sh; do
+	# shellcheck disable=1090
 	if [ -r "$sh" ]; then . "$sh" || true; fi
 done
 unset sh