From 289b8009813d040a319e62efed611ebfd61c873d Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 12 Mar 2025 19:58:07 +0100 Subject: set: 'br' also turns off and on --- set.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ;; -- cgit v1.2.3-70-g09d2