Created
September 17, 2019 14:24
-
-
Save gngdb/4fc27f64e5599d197e33b2bd6f18cdcd to your computer and use it in GitHub Desktop.
bashrc snippet for creating images for i3lock to use as a lockscreen background.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for making lockscreen images | |
set-i3lock-bg() { | |
if [ ! -f ~/lock.png ]; then | |
curl https://raw.githubusercontent.com/meskarune/i3lock-fancy/master/icons/lock.png > ~/lock.png | |
fi | |
SIZE=`xdpyinfo | grep dimensions | cut -d " " -f 7` | |
convert $1 -font Liberation-Sans \ | |
-geometry $SIZE -gravity center\ | |
-pointsize 26 -fill white -extent $SIZE -gravity center \ | |
-annotate +0+160 "Type Password to Unlock" ~/lock.png \ | |
-gravity center -composite ~/i3-background.png | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment