Skip to content

Instantly share code, notes, and snippets.

@gngdb gngdb/i3lock-bashrc
Created Sep 17, 2019

Embed
What would you like to do?
bashrc snippet for creating images for i3lock to use as a lockscreen background.
# 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
You can’t perform that action at this time.