18 lines
296 B
Plaintext
18 lines
296 B
Plaintext
|
#!/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
|