I tried using xbacklight, but it wasnt working so I made some custom global commands to control the brightness. For example:
sudo bash -c "echo 20 > /sys/class/backlight/acpi_video0/brightness"
sudo bash -c "echo 10 > /sys/class/backlight/acpi_video0/brightness"
sudo bash -c "echo 0 > /sys/class/backlight/acpi_video0/brightness"
I want to make two more commands, one that will increase the brightness by one and one that will decrease the brightness by one.
Is there some code I can use in place of 'echo "NUMBER"' that will decrease / increase the current value by one.
I know that the current brightness level is the document: /sys/class/backlight/acpi_video0/brightness which currently reads "20" and changes when using the brightness commands.
I have no idea what this command would be like but something like
sudo bash -c "echo [ONE LESS THAN] /sys/class/backlight/acpi_video0/brightness > /sys/class/backlight/acpi_video0/brightness"
I dont know if this is possible, but thanks for any help.
What is the correct usage?
When I run "sudo ./brightness.sh +1" it outputs :
Usage: sudo brightness.sh [ + | - | INTEGER ] ./brightness.sh: 10: [: +: unexpected operator ./brightness.sh: 23: [: +: unexpected operator ./brightness.sh: 38: ./brightness.sh: [[: not found <<< ERROR: wrong parameter ./brightness.sh: 44: ./brightness.sh: printUsage: not found
and when I run "sudo bash brightness.sh +1" it outputs :
Usage: sudo brightness.sh [ + | - | INTEGER ] brightness.sh: line 27: [: -1: unary operator expected brightness.sh: line 34: : No such file or directory