Do this... This just writes a value to the setting file in sysfs...
Code:
grep . $(ls -l /sys/class/backlight/*_backlight | awk '{print $9}')/brightness
That value is the current setting of the screen brightness...
You can change that value by echoing a number that location in the sysfs... Decrease the number for dimmer. Increase for brighter.
Code:
SysFS_Brightness=$(ls -l /sys/class/backlight/*_backlight | awk '{print $9 "/brightness"}') # This sets the path and file system to where the setting is...
export Brightness_Default=$(grep . $SysFS_Brightness) # This reads what the original setting was and saves it as an Environment variable
Brightness_Setting=0.75 # <-- Set this as how many percent brightness. 0.10 through 1.00
sudo echo $(awk -v brightness="${Brightness_Default}" -v setting="${Brightness_Setting}" 'BEGIN{print (brightness*setting)}') > $SysFS_Brightness # This will set it.
Bookmarks