From bcb8b9f457d3f41b97be43c1c267021a9168c173 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sun, 27 Jan 2019 17:32:59 +0100 Subject: [PATCH] make lock POSIX compliant --- scripts/lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lock b/scripts/lock index bec03ab..f1ee2f4 100755 --- a/scripts/lock +++ b/scripts/lock @@ -2,9 +2,9 @@ icon=$HOME/img/misc/lock.png tmpbg=/tmp/screenshot.png -(( $# )) && { icon=$1; } +test $# -eq 1 && icon=$1 scrot $tmpbg gm convert $tmpbg -scale 10% -scale 1000% $tmpbg -gm composite -resize 256x256^ -gravity center $icon $tmpbg $tmpbg +gm composite -resize 256x256^ -gravity center "$icon" $tmpbg $tmpbg i3lock -e -u -i $tmpbg 2>/dev/null