Hi everybody,
just stumbled over jgraves post here:
http://www.zaurususergroup.com/index.php?n...iewtopic&t=3262 It\'s very nice, but it needs xkeymouse to function properly.
I\'ve merged his scripts and got it working with the default openbox window manager. OpenBox can be configured with keymappings that can also execute apps or scripts. This is also the way changing the screen orientation works (that is: Sys_Req is triggered and openbox launches chkhinge).
Here is my merged version of jgraves\' scripts:
#!/bin/sh
# Get the current value
CURRENT_VALUE=`cat $HOME/Choices/common/backlight`
MIN_VALUE=0
MAX_VALUE=6
case "$1" in
up)
#If it is not already at the max value, increment it one.
if [ $CURRENT_VALUE = $MAX_VALUE ]; then
NEW_VALUE=$(($CURRENT_VALUE))
else
NEW_VALUE=$(($CURRENT_VALUE+1))
fi
;;
down)
#If it is not already at the min, decrement it one and save it.
if [ $CURRENT_VALUE = $MIN_VALUE ]; then
NEW_VALUE=$(($CURRENT_VALUE))
else
NEW_VALUE=$(($CURRENT_VALUE-1))
fi
;;
esac
setfl $NEW_VALUE
echo $NEW_VALUE > $HOME/Choices/common/backlight
UPDATE: I suggest using Zazz\' fl below instead of this merged script, as it is faster and doesn\'t stress the internal flash memory by writing the current brightness value over and over again.Just save it into a file named
light in
/usr/local/bin and make it executable by chmod 755 /usr/local/bin/light.
You can now control the brightness level with
light upor
light downTo make things work without using the terminal everytime, just add the following lines to the end of the <keyboard> element in the /etc/xdg/openbox/rc.xml (or $HOME/.config/openbox/rc.xml) file:
light down
light up
UPDATE: If you want to use Zazz\' fl below, just change light down to fl - and light up to fl +.
</keyboard> is the closing tag.
You\'ll need to restart either openbox or the whole X11. Simplest way is pressing CTRL-ALT-Backspace and just restarting the X11 Server via startx.
Using Fn-3 will lower the brightness, Fn-4 vice versa.
Please note, that this will only work, if you\'re using the openbox window manager. This is what comes with the default install of pdaXrom.
Regards,
evilJazz