Skip to content

Instantly share code, notes, and snippets.

@jarun jarun/brightness
Created Nov 4, 2014

Embed
What would you like to do?
brightness control
------------
/usr/bin/br+
------------
#!/bin/bash
curval=`cat /sys/class/backlight/intel_backlight/brightness`
if [ $curval -ge 700 ]; then
echo already max
else
`echo $(expr $curval + 50) | sudo tee /sys/class/backlight/intel_backlight/brightness`
fi
------------
/usr/bin/br-
------------
#!/bin/bash
curval=`cat /sys/class/backlight/intel_backlight/brightness`
if [ $curval -le 100 ]; then
echo already min
else
`echo $(expr $curval - 50) | sudo tee /sys/class/backlight/intel_backlight/brightness`
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.