Created
June 8, 2013 00:04
-
-
Save JamesTheBard/5733235 to your computer and use it in GitHub Desktop.
The cool pixelated i3lock script provided by Steffan Honig.
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
#!/bin/bash | |
# | |
# This is an easier-to-tweak version of Steffen Honig's i3lock | |
# script. If it doesn't work, it's his fault ;) | |
# | |
TEMP_FILE=/tmp/lock.png | |
TEMP_FILE_POST=/tmp/lock.modified.png | |
BAR_BG_COLOR="orange" | |
BAR_FONT_COLOR="white" | |
BAR_FONT="Source-Code-Pro-Black" | |
BAR_WIDTH="1920" | |
BAR_HEIGHT="30" | |
MOGRIFY_OPTS="-scale 10% -scale 1000% $TEMP_FILE" | |
MESSAGE="SYSTEM LOCKED: $USER" | |
CONVERT_OPTS="-background $BAR_BG_COLOR -gravity center -fill $BAR_FONT_COLOR -font $BAR_FONT -size ${BAR_WIDTH}x${BAR_HEIGHT} caption:@- $TEMP_FILE +swap -composite $TEMP_FILE_POST" | |
rm $TEMP_FILE $TEMP_FILE_POST | |
scrot $TEMP_FILE | |
mogrify $MOGRIFY_OPTS | |
echo $MESSAGE | tr -d "\n" | convert $CONVERT_OPTS | |
i3lock -i $TEMP_FILE_POST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment