diff options
Diffstat (limited to 'bin/misc/brightness.sh')
-rwxr-xr-x | bin/misc/brightness.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/misc/brightness.sh b/bin/misc/brightness.sh new file mode 100755 index 0000000..4f548f5 --- /dev/null +++ b/bin/misc/brightness.sh | |||
@@ -0,0 +1,10 @@ | |||
1 | #! /usr/bin/env bash | ||
2 | |||
3 | BACKLIGHT_DIR=/sys/class/backlight/intel_backlight | ||
4 | |||
5 | CURRENT=$(cat $BACKLIGHT_DIR/brightness) | ||
6 | MAX=$(cat $BACKLIGHT_DIR/max_brightness) | ||
7 | |||
8 | echo " $CURRENT + ( $MAX * ${1/+} )" | \ | ||
9 | bc | \ | ||
10 | cut -d'.' -f1 >$BACKLIGHT_DIR/brightness | ||