i3lock-custom: Simplify lock screen

This commit is contained in:
Salt 2019-04-09 05:02:25 -05:00
parent a544d9827d
commit 5b16e99296

View File

@ -56,20 +56,20 @@ step_produce_image() {
set +e set +e
umask 077 umask 077
cd "$tmpdir" || exit cd "$tmpdir" || exit
# Grab a screenshot and perform some calculations to make our black bar # I know this is inefficient but it's an easier solution than parsing
# xrandr
import -window root scrot.bmp import -window root scrot.bmp
lockimg_gz | base64 -d | gunzip > lock.png lockimg_gz | base64 -d | gunzip > lock.png
rectangle="rectangle $(convert scrot.bmp -print "0,%[fx:h/2+128] %w,%[fx:h/2-128]" /dev/null)" rectangle="rectangle $(convert scrot.bmp -print "0,0 %w,%h" /dev/null)"
# Do the do # Do the do
# Output is in PNG so i3lock doesn't OOM # Output is in PNG so i3lock doesn't OOM
convert \ convert \
scrot.bmp \ scrot.bmp \
-blur 10x5 \
-fill \#383c4a\ -fill \#383c4a\
-draw "$rectangle" \ -draw "$rectangle" \
lock.png -gravity center -compose src-over -composite \ lock.png -gravity center -compose src-over -composite \
"$HOME/.face" -gravity center -geometry 128x128+200+0 -compose src-over -composite \ "$HOME/.face" -gravity center -geometry 128x128+216+0 -compose src-over -composite \
end.png end.png
) )
return $? return $?