Compare commits

...

2 commits

2 changed files with 25 additions and 0 deletions

24
backlight_brightness.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/sh
set -e
usage() {
echo "usage: $0 value brightness_path"
exit 1
}
if [ $# -ne 2 ]; then
usage
fi
actual_brightness=$(cat "$2/actual_brightness")
max_brightness=$(cat "$2/max_brightness")
new_brightness=$(("$actual_brightness" + "$1"))
if [ "$new_brightness" -gt "$max_brightness" ]; then
new_brightness="$max_brightness"
elif [ "$new_brightness" -lt "0" ]; then
new_brightness="0"
fi
echo "$new_brightness" > "$2/brightness"

View file

@ -28,6 +28,7 @@ borg create \
--exclude '/var/tmp/*' \
--exclude '/share/media/*' \
--exclude '/var/lib/libvirt/images/*' \
--exclude '/home/finga/.rustup' \
\
::'{hostname}-{now}' \
/etc \