Dependancyfree

Now without brightnessctl dependancy
This commit is contained in:
steel99xl 2024-02-18 22:11:43 -05:00
parent e8daf94cda
commit 1a919d6299
2 changed files with 25 additions and 10 deletions

View file

@ -146,17 +146,29 @@ do
NewLight=$(( $DiffCount )) NewLight=$(( $DiffCount ))
# Format values apropriatly for brightnessctl
if [[ $NewLight -lt 0 ]] CurrentBrightness=$(cat $BLightPath)
FakeLight=$(( $NewLight + $CurrentBrightness))
if [[ $FakeLight -gt $MaxScreenBrightness ]]
then then
NewLight=$( echo "$NewLight" | awk -F "-" {'print$2'}) NewLight=$MaxScreenBrightness
NewLight=$(echo $NewLight-) echo "ERROR"
else else
NewLight=$(echo +$NewLight) echo $FakeLight > $BLightPath
fi fi
# Format values apropriatly for brightnessctl
#if [[ $NewLight -lt 0 ]]
#then
#NewLight=$( echo "$NewLight" | awk -F "-" {'print$2'})
#NewLight=$(echo $NewLight-)
#else
#NewLight=$(echo +$NewLight)
#fi
# Adjust brightness relativly # Adjust brightness relativly
brightnessctl -q s $NewLight #brightnessctl -q s $NewLight
# Sleep for the screen Hz time so he effect is visible # Sleep for the screen Hz time so he effect is visible
sleep $AnimationDelay sleep $AnimationDelay

View file

@ -10,7 +10,10 @@ based on 2017 MacBook Pro
read ```Configuration``` for detailed informatoion about what options you have to easily customize/ adjust the bightness or animation speed read ```Configuration``` for detailed informatoion about what options you have to easily customize/ adjust the bightness or animation speed
## Requires ## Requires
brightnessctl For running in as your user you need to be part of the ```vidoe``` group
```sudo usermod -a -G vido $USER``` if your not apart of the group
If your installing as a system service your user dose not need to be apart of the group
## Non 12th Gen Intel Framework Owners ## Non 12th Gen Intel Framework Owners
Your sensor has a diffrent range thant the 12th Gen Intel Framework laptop sensors, please see chart bellow Your sensor has a diffrent range thant the 12th Gen Intel Framework laptop sensors, please see chart bellow