summaryrefslogtreecommitdiff
path: root/keyboard/bl
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2022-03-16 23:37:09 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2022-03-16 23:37:09 -0500
commit3d3d79a57fb6d0a5728e0070475f05d1699f0818 (patch)
treeb141cba678d6bb9821bb33b0dd7c7f1ca31b2c6a /keyboard/bl
parentd51fa1bdda79b8589ddf0002fc4b54aac6ce8354 (diff)
downloadscripts-3d3d79a57fb6d0a5728e0070475f05d1699f0818.tar.xz
scripts-3d3d79a57fb6d0a5728e0070475f05d1699f0818.zip
move a lot of scripts around and make a bunch of minor changes. once again i am too lazy to document the changes properly since im never going to read these commit messages anyways
Diffstat (limited to 'keyboard/bl')
-rwxr-xr-xkeyboard/bl30
1 files changed, 0 insertions, 30 deletions
diff --git a/keyboard/bl b/keyboard/bl
deleted file mode 100755
index 2bbd951..0000000
--- a/keyboard/bl
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-xbacklight -$1 $2 -time 50 -steps 5 2>/dev/null && exit
-
-red=16
-green=18
-blue=1A
-getbl() { bl=$(doas ddcutil getvcp $red | sed 's/.*current value =\s*\([0-9]*\).*/\1/'); } # Get brightness of red channel so we only have to grab one
-case "$1" in
- dec)
- getbl
- [ $bl = 0 ] && exit
- bl=$(( bl - $2 ))
- [ $bl -lt 0 ] && bl=0
- ;;
- inc)
- getbl
- [ $bl = 100 ] && exit
- bl=$(( bl + $2 ))
- [ $bl -gt 100 ] && bl=100
- ;;
- set)
- bl=$2
- [ $bl -lt 0 ] || [ $bl -gt 100 ] && echo "Invalid value" && exit
- ;;
- *)
- echo "Invalid option" && exit
- ;;
-esac
-for color in $red $green $blue; do doas ddcutil setvcp $color $bl; done
-#dwmsbup 20