From 11bb4e1c6d82b396e884fdea085631c4bac67050 Mon Sep 17 00:00:00 2001 From: Ibrahim Jarif Date: Sun, 1 Sep 2019 01:45:13 +0530 Subject: [PATCH] Fix null check for lock_timeout This commit fixes an issue with the validating the `lock_timeout` value. The current implementation would complain if `lock_timeout` value is null. --- betterlockscreen | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/betterlockscreen b/betterlockscreen index 7d775f9..c94090b 100755 --- a/betterlockscreen +++ b/betterlockscreen @@ -71,7 +71,7 @@ init_filenames "$res" prelock() { - if [ -n lock_timeout ]; then + if [ ! -z "$lock_timeout" ]; then xset dpms "$lock_timeout" fi if [ ! -z "$(pidof dunst)" ]; then @@ -100,7 +100,7 @@ lock() { postlock() { - if [ -n lock_timeout ]; then + if [ ! -z "$lock_timeout" ]; then xset dpms "$default_timeout" fi if [ ! -z "$(pidof dunst)" ] ; then