Fix toggle brightness script

This commit is contained in:
Out Of Ideas 2024-04-01 18:52:01 -05:00
parent c3755e825b
commit 84ee35309e
1 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,11 @@ BRIGHTNESS=$(brightnessctl | head -2 | tail +2 | awk '{print $4}' | tr -cd '[[:d
# Then Set the Brightnes to the
# Brightness at the time the Brightness was Turned Off
if $(cat $STATUS_FILE2); then
if [ $BRIGHTNESS -gt 0 ]; then
eww update brightness=0
eww update metric-brightness="zero"
doas /usr/bin/brightnessctl s 0%
fi
doas /usr/bin/brightnessctl s $(cat $STATUS_FILE)%
# Then Update the Value that is seen by Eww (Eww will now display than amount)
eww update brightness=$(cat $STATUS_FILE)