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:
		
							parent
							
								
									894893943c
								
							
						
					
					
						commit
						b4948cf46f
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		
							
								
								
									
										8
									
								
								setup.sh
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								setup.sh
									
										
									
									
									
								
							| 
						 | 
					@ -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
 | 
					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..."
 | 
					echo "Cloning AutomaticBrighness.sh..."
 | 
				
			||||||
sudo cp AutomaticBrightness.sh /usr/local/bin/AutomaticBrightness.sh
 | 
					sudo cp AutomaticBrightness.sh /usr/local/bin/AutomaticBrightness.sh
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue