summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xset.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/set.sh b/set.sh
index 3cd3551..eff31cb 100755
--- a/set.sh
+++ b/set.sh
@@ -51,7 +51,11 @@ while [[ $# -gt 0 ]]; do
br)
[[ $# -lt 2 ]] && { echo >&2 "Not enough arguments to 'br' command"; exit 1; }
- commandstr="$commandstr * {dimming:{brightness:$2}}"
+ if [[ $2 -gt 0 ]]; then
+ commandstr="$commandstr * {on:{on:true}, dimming:{brightness:$2}}"
+ else
+ commandstr="$commandstr * {on:{on:false}}"
+ fi
shift 2
;;