summaryrefslogtreecommitdiff
path: root/bin/.bin/light
blob: bba7e8264aa1c60cca3df028a2671a87e7319673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# brightness wrapper

case "$1" in
    u*)
        for f in /sys/class/backlight/*; do
            echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness;
        done
        ;;
    d*)
        for f in /sys/class/backlight/*; do
            echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness;
        done
        ;;
    *)
        echo "choose u or d"
        ;;
esac