Skip to content

Instantly share code, notes, and snippets.

@0undefined
Created November 21, 2017 13:21
Show Gist options
  • Save 0undefined/cdd348407fbb6a334b55b7412f68a8dc to your computer and use it in GitHub Desktop.
Save 0undefined/cdd348407fbb6a334b55b7412f68a8dc to your computer and use it in GitHub Desktop.
A script to do mostly the same as i3lock-blur. Tweak `convert` to get the desired result.
#!/bin/env bash
outputs=`swaymsg -t get_outputs | grep -oE "DP-[0-9]"`
for o in $outputs
do
swaygrab -o $o ${o}.png
# Actually, this doesn't work if your monitors arent this size... should be tweaked too
convert ${o}.png -scale 240x135 ${o}.png
convert ${o}.png -scale 1920x1080 ${o}.png
images="${images} -i ${o}:${o}.png"
cleanup="${cleanup} ${o}.png"
done
swaylock -u $images
rm $cleanup
@0undefined
Copy link
Author

An update that also fetches the right resolution will be coming at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment