Skip to content

Instantly share code, notes, and snippets.

@gngdb gngdb/i3lock-bashrc

Created Sep 17, 2019
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 > ~/lock.png
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.