summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-03-12 19:58:07 +0100
committerTom Smeding <tom@tomsmeding.com>2025-03-12 19:58:07 +0100
commit289b8009813d040a319e62efed611ebfd61c873d (patch)
tree400df94dc76c62ff8c06f0cee7291c97150d44a1
parent6b2a60ee925d62ee53be9c2b064cca12d01dbdd6 (diff)
set: 'br' also turns off and onHEADmaster
-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
;;