aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIbrahim Jarif <jarifibrahim@gmail.com>2019-09-01 01:45:13 +0530
committerPhilipp Hemmelmayr <fips.hem@gmail.com>2019-09-02 21:31:49 +0200
commit11bb4e1c6d82b396e884fdea085631c4bac67050 (patch)
treeb2648d62233ec4dfc8ef411850e2a422bff9e0de
parent89f7dcd2be2053297c559762d23b5e4a6ba20546 (diff)
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.
-rwxr-xr-xbetterlockscreen4
1 files 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