feat: bash

This commit is contained in:
ange 2024-06-23 11:51:38 +02:00
parent 937ab54f8c
commit 7ae0b331cf
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
30 changed files with 517 additions and 65 deletions

View file

@ -13,7 +13,6 @@ function set_light() {
echo "$((CUR * max / 100))" > "$1/brightness"
}
NOTIFY=(notify-send -t 1000 -a "$(basename "$0")" -u low)
DIRS=(/sys/class/backlight/*)
CUR="$(get_current "${DIRS[0]}")"
@ -34,4 +33,5 @@ for d in "${DIRS[@]}"; do
set_light "$d"
done
"${NOTIFY[@]}" -h string:synchronous:light -h int:value:"$CUR" "$CUR%"
notify-send -t 1000 -u low -i display-brightness-symbolic \
-h string:synchronous:light -h int:value:"$CUR" "$CUR%"