i have this little script that sets the brightness of my screen deepending on if my laptop is plugged in or not, but sadly, it does not work, I have no idea why.
the file is /etc/acpi/events/smartdimmer.sh
i chmod +x smartdimmer.sh as root
and this is the file itself, i don't kno w why it is not working.
ACSTATE=`cat /proc/acpi/ac_adapter/ACAD/state | cut-d: -f2 | sed -e 's/^ *//g'`
if [ $ACSTATE == "on-line" ]; then
smartdimmer -s 21
elif [ $ACSTATE == "off-line" ]; then
smartdimmer -s 2