LevelSetps now automaticaly configurs based on your maxbrighrness

if needed (this is to keep it close to how a 2017 macbook pro behaves even with a limited range)
This commit is contained in:
steel99xl 2024-03-15 23:39:09 -04:00
parent 894893943c
commit b4948cf46f

View file

@ -35,6 +35,14 @@ Final="SensorToDisplayScale=$Scale"
awk -v new_phrase="$Final" '/SensorToDisplayScale=/{ print new_phrase; next } 1' AutomaticBrightness.sh > temp && mv temp AutomaticBrightness.sh
TempSteps=($MaxScreenBrightness / 60)
if [[ TempSteps -lt 17 ]]
then
Steps=$($MaxScreenBrightness / 16)
NewStep="LevelSteps=$Steps"
awk -v new_phrase="$NewStep" '/LevelSteps=/{ print new_phrase; next } 1' AutomaticBrightness.sh > temp && mv temp AutomaticBrightness.sh
fi
echo "Cloning AutomaticBrighness.sh..."
sudo cp AutomaticBrightness.sh /usr/local/bin/AutomaticBrightness.sh