mabox-tools/bin/mb-brightness

18 lines
296 B
Plaintext
Raw Normal View History

2023-05-18 16:06:23 +02:00
#!/bin/bash
## mb-brightness - control brightness on Mabox
CARD=$(ls /sys/class/backlight | head -n 1)
inc() {
[[ "$CARD" == *"intel_"* ]] && xbacklight -inc 10 || light -A 5
}
dec() {
[[ "$CARD" == *"intel_"* ]] && xbacklight -dec 10 || light -U 5
}
case "$1" in
inc)inc;;
dec)dec;;
esac