aboutsummaryrefslogtreecommitdiff
path: root/i3lock.sh
diff options
context:
space:
mode:
Diffstat (limited to 'i3lock.sh')
-rwxr-xr-xi3lock.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/i3lock.sh b/i3lock.sh
index 0b8ad16..2eed74c 100755
--- a/i3lock.sh
+++ b/i3lock.sh
@@ -2,8 +2,9 @@
# Generates an i3lock bg based on a screenshot.
-imgLock="$HOME/images/padlocks.png"
+imgLock="$HOME/images/icons/lock.png"
+imgTemp="/tmp/i3lockss.png"
imgFinal="/tmp/lockFinal$(date +"%H%M%S").png"
-maim /tmp/i3lockss.png
-convert /tmp/i3lockss.png -paint 1 -swirl -120 "$imgLock" -gravity center -composite "$imgFinal"
-i3lock -i "$imgFinal" -f
+maim "$imgTemp"
+[ -e "$imgLock" ] && convert "$imgTemp" -paint 1 -swirl -30 "$imgLock" -gravity center -composite "$imgFinal"
+i3lock -i "$imgFinal" -f || i3lock -i "$imgTemp" -f