Skip to content

Instantly share code, notes, and snippets.

@nkoehring
Last active December 27, 2015 16:39
Show Gist options
  • Save nkoehring/7356619 to your computer and use it in GitHub Desktop.
Save nkoehring/7356619 to your computer and use it in GitHub Desktop.
simple but fancy screen locker? now even faster image creation!
#!/bin/sh
# the lock-icon I use can be found at http://koehr.in/img/lock-icon.png and is derived from
# http://icons.iconarchive.com/icons/visualpharm/icons8-metro-style/512/Very-Basic-Lock-icon.png
TMP=/tmp
XWD=$TMP/lock-${USER}.xwd
IMG=$TMP/lock-${USER}.png
LOCK=$HOME/images/lock-icon.png
#import -window root $IMG &&
xwd -root -out $XWD
convert $XWD -sigmoidal-contrast 5x1 -blur 6x3 $IMG &&
composite -gravity center -compose exclusion $LOCK $IMG $IMG &&
i3lock -i $IMG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment