diff options
Diffstat (limited to 'util/backlight.sh')
| -rwxr-xr-x | util/backlight.sh | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/util/backlight.sh b/util/backlight.sh deleted file mode 100755 index 15a8423..0000000 --- a/util/backlight.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -set -x -set -e -# Note the trailing slash -# base="/sys/class/backlight/amdgpu_bl0/" -base="/sys/class/backlight/intel_backlight/" - -percent="$1"; shift -_backlight="${base}brightness" -_max="${base}max_brightness" - -# Since `bc` is often not installed by default, just use awk -_max="$(awk '{print $1/100;}' "$_max")" -percent="$(echo "${percent}" | awk '{print int($1*'"$_max"');}')" - -echo $percent - - -sudo sh -c "echo \"$percent\" > $_backlight" |
