summaryrefslogtreecommitdiff
path: root/bin/.bin/light
diff options
context:
space:
mode:
Diffstat (limited to 'bin/.bin/light')
-rwxr-xr-xbin/.bin/light19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/.bin/light b/bin/.bin/light
new file mode 100755
index 0000000..bba7e82
--- /dev/null
+++ b/bin/.bin/light
@@ -0,0 +1,19 @@
1#!/bin/bash
2# brightness wrapper
3
4case "$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 ;;
18esac
19