diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2023-02-14 13:33:23 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2023-02-14 13:33:23 +0800 |
commit | 6fae25b305d714b3ab7608fa003f1af9bf024545 (patch) | |
tree | 05507b2c0505659d2fd847ecce988dacab63a236 /bin/misc/brightness.sh | |
parent | 41ad31a2dee9ff912f222652f022b4c55cddcbf7 (diff) |
Rename tools into bin
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 | ||