diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-03-12 19:58:07 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-03-12 19:58:07 +0100 |
commit | 289b8009813d040a319e62efed611ebfd61c873d (patch) | |
tree | 400df94dc76c62ff8c06f0cee7291c97150d44a1 | |
parent | 6b2a60ee925d62ee53be9c2b064cca12d01dbdd6 (diff) |
-rwxr-xr-x | set.sh | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 ;; |