Dependancyfree
Now without brightnessctl dependancy
This commit is contained in:
parent
e8daf94cda
commit
1a919d6299
2 changed files with 25 additions and 10 deletions
|
@ -146,17 +146,29 @@ do
|
|||
NewLight=$(( $DiffCount ))
|
||||
|
||||
|
||||
# Format values apropriatly for brightnessctl
|
||||
if [[ $NewLight -lt 0 ]]
|
||||
|
||||
CurrentBrightness=$(cat $BLightPath)
|
||||
FakeLight=$(( $NewLight + $CurrentBrightness))
|
||||
|
||||
if [[ $FakeLight -gt $MaxScreenBrightness ]]
|
||||
then
|
||||
NewLight=$( echo "$NewLight" | awk -F "-" {'print$2'})
|
||||
NewLight=$(echo $NewLight-)
|
||||
NewLight=$MaxScreenBrightness
|
||||
echo "ERROR"
|
||||
else
|
||||
NewLight=$(echo +$NewLight)
|
||||
echo $FakeLight > $BLightPath
|
||||
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
|
||||
brightnessctl -q s $NewLight
|
||||
#brightnessctl -q s $NewLight
|
||||
# Sleep for the screen Hz time so he effect is visible
|
||||
sleep $AnimationDelay
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
## 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
|
||||
Your sensor has a diffrent range thant the 12th Gen Intel Framework laptop sensors, please see chart bellow
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue