summaryrefslogtreecommitdiff
path: root/bin/.bin/light
blob: d44b24190b67a5d25569fba659aaa83569df1322 (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)+2*$(<$f/max_brightness)/100)) > $f/brightness;
        done
        ;;
    d*)
        for f in /sys/class/backlight/*; do
            echo $(($(<$f/brightness)-2*$(<$f/max_brightness)/100)) > $f/brightness;
        done
        ;;
    *)
        echo "choose u or d"
        ;;
esac