diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/.local/bin/light | 19 | 
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/.local/bin/light b/bin/.local/bin/light new file mode 100755 index 0000000..b34150f --- /dev/null +++ b/bin/.local/bin/light  | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # brightness wrapper | ||
| 3 | |||
| 4 | case "$1" in | ||
| 5 | u*) | ||
| 6 | for f in /sys/class/backlight/*; do | ||
| 7 | echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness; | ||
| 8 | done | ||
| 9 | ;; | ||
| 10 | d*) | ||
| 11 | for f in /sys/class/backlight/*; do | ||
| 12 | echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness; | ||
| 13 | done | ||
| 14 | ;; | ||
| 15 | *) | ||
| 16 | echo "choose u or d" | ||
| 17 | ;; | ||
| 18 | esac | ||
| 19 | |||
