From cc2ca23837ac7348e21f4bca960f7236cb13dfed Mon Sep 17 00:00:00 2001
From: Salt <rehashedsalt@cock.li>
Date: Thu, 22 Nov 2018 02:42:10 -0600
Subject: [PATCH] i3lock-custom: Code quality brushups

---
 i3lock-custom | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/i3lock-custom b/i3lock-custom
index ff40f23..c99e65c 100755
--- a/i3lock-custom
+++ b/i3lock-custom
@@ -56,7 +56,7 @@ step_produce_image() {
 	# Really wanna make damn sure that we handle this well
 	set +e
 	umask 077
-	cd "$tmpdir"
+	cd "$tmpdir" || exit
 	# Grab a screenshot and perform some calculations to make our black bar
 	import -window root scrot.bmp
 	lockimg_gz | base64 -d | gunzip > lock.png
@@ -82,7 +82,7 @@ step_start_i3lock() {
 step_start_conky() {
 	i=0
 	while ! xprop -name "i3lock" > /dev/null 2>&1; do
-		i=$(( $i + 1 ))
+		i=$(( i + 1 ))
 		if [ "$i" -eq "100" ]; then
 			return 1
 		fi
@@ -105,5 +105,5 @@ main() {
 	step_wait
 }
 
-main $@
+main "$@"