summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-04-20 14:57:11 -0500
committerzachir <zachir@librem.one>2023-04-20 14:57:11 -0500
commitb0cedf115516103c9e02f1c4a506565da66aeb08 (patch)
tree8a4d19492f9bc5d6f368dccc56f22e89b5800fbb
parent3c8f6acf1df57b5eb09b1f95f886747ba14de4f8 (diff)
set default inc/dec to 1% and default cmd to get
-rwxr-xr-xbl12
1 files changed, 6 insertions, 6 deletions
diff --git a/bl b/bl
index de3b133..898faee 100755
--- a/bl
+++ b/bl
@@ -8,15 +8,15 @@ case "$CMD" in
"light")
case "$1" in
"-i")
- light -A "$2"
+ light -A "${2:-1%}"
;;
"-d")
- light -U "$2"
+ light -U "${2:-1%}"
;;
"-s")
light -S "$2"
;;
- "-g")
+ "-g"|"")
light -G
;;
"*")
@@ -28,15 +28,15 @@ case "$CMD" in
"xbacklight")
case "$1" in
"-i")
- xbacklight -inc "$2"
+ xbacklight -inc "${2:-1}"
;;
"-d")
- xbacklight -dec "$2"
+ xbacklight -dec "${2:-1}"
;;
"-s")
xbacklight -set "$2"
;;
- "-g")
+ "-g"|"")
xbacklight -get
;;
"*")