From fe34795f86a7b2c72a4b6661f519021efb568f34 Mon Sep 17 00:00:00 2001 From: Stacy Harper Date: Tue, 24 Aug 2021 13:03:23 +0200 Subject: [PATCH] Allow sxmo_idle config menu to disable an kind --- scripts/core/sxmo_idle.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/core/sxmo_idle.sh b/scripts/core/sxmo_idle.sh index 474ba60..19f2b11 100644 --- a/scripts/core/sxmo_idle.sh +++ b/scripts/core/sxmo_idle.sh @@ -82,7 +82,11 @@ configmenu() { printf "" | \ sxmo_dmenu_with_kb.sh -p "New value" )" - [ "$new_value" -gt 5 ] || unset new_value + if ! [ "$new_value" -eq "$new_value" ]; then + unset new_value # not an integer value + elif [ "$new_value" -lt 5 ] && [ "$new_value" -ne 0 ]; then + unset new_value + fi done sed -i "s|$target $old_value|$target $new_value|" "$CACHEDIR"/sxmo.idle.state