Merge pull request #9 from Harfeur/main
Fixed two issues: printf float and execute permission
This commit is contained in:
commit
cc1d45195c
2 changed files with 3 additions and 2 deletions
|
@ -122,7 +122,7 @@ do
|
||||||
|
|
||||||
# Gernate a TempLight value for the screen to be set to
|
# Gernate a TempLight value for the screen to be set to
|
||||||
# Float math thanks Matthias_Wachter
|
# Float math thanks Matthias_Wachter
|
||||||
TempLight=$(LANG=C printf "%.0f" $(echo "scale=2; $Light * $SensorToDisplayScale" | bc))
|
TempLight=$(LC_NUMERIC=C printf "%.0f" $(echo "scale=2; $Light * $SensorToDisplayScale" | bc))
|
||||||
|
|
||||||
|
|
||||||
# Check we dont ask the screen to go brighter than it can
|
# Check we dont ask the screen to go brighter than it can
|
||||||
|
@ -134,7 +134,7 @@ do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# How diffrent should each stop be
|
# How diffrent should each stop be
|
||||||
DiffCount=$(LANG=C printf "%.0f" $(echo "scale=2; ( $NewLight - $CurrentBrightness ) / $LevelSteps" | bc ))
|
DiffCount=$(LC_NUMERIC=C printf "%.0f" $(echo "scale=2; ( $NewLight - $CurrentBrightness ) / $LevelSteps" | bc ))
|
||||||
|
|
||||||
# Step once per Screen Hz to make animation
|
# Step once per Screen Hz to make animation
|
||||||
for i in $(eval echo {1..$LevelSteps} )
|
for i in $(eval echo {1..$LevelSteps} )
|
||||||
|
|
1
setup.sh
1
setup.sh
|
@ -46,6 +46,7 @@ fi
|
||||||
|
|
||||||
echo "Cloning AutomaticBrighness.sh..."
|
echo "Cloning AutomaticBrighness.sh..."
|
||||||
sudo cp AutomaticBrightness.sh /usr/local/bin/AutomaticBrightness.sh
|
sudo cp AutomaticBrightness.sh /usr/local/bin/AutomaticBrightness.sh
|
||||||
|
sudo chmod u+x /usr/local/bin/AutomaticBrightness.sh
|
||||||
|
|
||||||
echo "Cloning AB.service for systemD..."
|
echo "Cloning AB.service for systemD..."
|
||||||
sudo cp AB.service /etc/systemd/system/AB.service
|
sudo cp AB.service /etc/systemd/system/AB.service
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue