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 ))
|
NewLight=$(( $DiffCount ))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CurrentBrightness=$(cat $BLightPath)
|
||||||
|
FakeLight=$(( $NewLight + $CurrentBrightness))
|
||||||
|
|
||||||
|
if [[ $FakeLight -gt $MaxScreenBrightness ]]
|
||||||
|
then
|
||||||
|
NewLight=$MaxScreenBrightness
|
||||||
|
echo "ERROR"
|
||||||
|
else
|
||||||
|
echo $FakeLight > $BLightPath
|
||||||
|
fi
|
||||||
|
|
||||||
# Format values apropriatly for brightnessctl
|
# Format values apropriatly for brightnessctl
|
||||||
if [[ $NewLight -lt 0 ]]
|
#if [[ $NewLight -lt 0 ]]
|
||||||
then
|
#then
|
||||||
NewLight=$( echo "$NewLight" | awk -F "-" {'print$2'})
|
#NewLight=$( echo "$NewLight" | awk -F "-" {'print$2'})
|
||||||
NewLight=$(echo $NewLight-)
|
#NewLight=$(echo $NewLight-)
|
||||||
else
|
#else
|
||||||
NewLight=$(echo +$NewLight)
|
#NewLight=$(echo +$NewLight)
|
||||||
fi
|
#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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue