From baedeee2434c322d70129038fd98fd1072082425 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Tue, 1 Jun 2021 17:30:00 +0200 Subject: [PATCH] Fixes - Restore get_light(), that's still needed - Remove cut from get_light() - Add numeric value to notification - Fix erroneous removal of xbacklight -dec 10 operation --- arch-config/scripts/dunst-backlight.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch-config/scripts/dunst-backlight.sh b/arch-config/scripts/dunst-backlight.sh index d3d49d41..c6456af2 100755 --- a/arch-config/scripts/dunst-backlight.sh +++ b/arch-config/scripts/dunst-backlight.sh @@ -4,11 +4,10 @@ # $./dunst-backlight.sh up # $./dunst-backlight.sh down -: ' get_light() { - xbacklight -get | cut -f1 -d"." + #xbacklight -get | cut -f1 -d"." + xbacklight -get } -' send_notification() { light=$(get_light) @@ -16,7 +15,7 @@ send_notification() { # https://en.wikipedia.org/wiki/Box-drawing_character bar=$(seq -s "─" $(($light/ 5)) | sed 's/[0-9]//g') # Send the notification - dunstify -i whitebalance -r 2489 -a backlight-script " $bar " + dunstify -i whitebalance -r 2489 -a backlight-script "$light $bar " } case $1 in @@ -31,6 +30,7 @@ case $1 in ;; down) # Decrease backlight + xbacklight -dec 10 > /dev/null #xbacklight -dec 9% > /dev/null # legacy xorg-xbacklight send_notification #backlightraw=$(xbacklight -get)