Switched back to brightnessctl, silenced the brightnesswench
This commit is contained in:
		
							parent
							
								
									37c46b0e3a
								
							
						
					
					
						commit
						13556a82d6
					
				
					 1 changed files with 4 additions and 14 deletions
				
			
		|  | @ -1,19 +1,9 @@ | ||||||
| #!/usr/bin/env bash | #!/usr/bin/env bash | ||||||
| # Toggle brightness to 'sleep' or 'awake', since brightnessctl does not support  | # Toggle brightness to 'sleep' or 'awake', since brightnessctl does not support  | ||||||
| # percentages of current amount. | # percentages of current amount. | ||||||
| # Just run the script (twice) | # Just run the script | ||||||
| 
 | 
 | ||||||
| # Permanent memory | current=$( brightnessctl get ) | ||||||
| previous='' |  | ||||||
| 
 |  | ||||||
| if [ -z "${previous}" ] ; then  |  | ||||||
|     current=$( cat /sys/class/backlight/intel_backlight/actual_brightness ) |  | ||||||
| # Doesn't have to be accurate so we can use built-in calculator. | # Doesn't have to be accurate so we can use built-in calculator. | ||||||
|     echo $(( current / 10 * 3 )) > /sys/class/backlight/intel_backlight/brightness | brightnessctl -sq set $(( current / 10 * 3 )) | ||||||
| else |  | ||||||
|     echo "${previous}" > /sys/class/backlight/intel_backlight/brightness |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| # Write to file |  | ||||||
| sed -i "s/^previous=.*$/previous=${current:-''}/" "${0}" |  | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue