summaryrefslogtreecommitdiffstats
path: root/keyboard/bl
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2026-09-14 22:30:32 -0500
committerTim Keller <tjk@tjkeller.xyz>2026-09-14 22:30:32 -0500
commit3893c82e4f1f456aad4d8f6cf37ec53dfeca8285 (patch)
treed0c6429f1031829d4fea5132cb3fe3a34b4169c3 /keyboard/bl
parent99cd393d8c6290e5bf68da7c9dbbc0a572eecbcc (diff)
downloadscripts-3893c82e4f1f456aad4d8f6cf37ec53dfeca8285.tar.xz
scripts-3893c82e4f1f456aad4d8f6cf37ec53dfeca8285.zip
update bl script to use brightnessctl instead of light
Diffstat (limited to 'keyboard/bl')
-rwxr-xr-xkeyboard/bl10
1 files changed, 5 insertions, 5 deletions
diff --git a/keyboard/bl b/keyboard/bl
index 4ddff29..7cfd73c 100755
--- a/keyboard/bl
+++ b/keyboard/bl
@@ -1,5 +1,5 @@
#!/bin/sh
-# Depends on ddcutil, light
+# Depends on ddcutil, brightnessctl
# Config
sleep_multiplier=.1 # Set this as low as you can get away with
bl_vcp=0x10 # 0x10 is the standard VCP for controlling the backlight
@@ -28,10 +28,10 @@ i2c_group() {
if xrandr | grep -E '(eDP|LVDS-[0-9]) connected' > /dev/null; then
case $1 in
- set) light -S $2 ;;
- inc|+) light -A $2 ;;
- dec|-) light -U $2 ;;
- get|*) printf "eDP: " && light | tr -d '\n' && echo '%' ;;
+ set) brightnessctl s ${2}% ;;
+ inc|+) brightnessctl s +${2}% ;;
+ dec|-) brightnessctl s ${2}%- ;;
+ get|*) printf "eDP: " && brightnessctl -m i | cut -d, -f4 ;;
esac
fi