Re: display brighness on battery
Marcus Moeller <[email protected]> Thu, 18 Aug 2011 18:00:05 +0200
| Newsgroups | gmane.comp.window-managers.icewm.user |
|---|---|
| Message-ID | <[email protected]> |
Hi again. >> I wonder if there is a way to reduce the display brightness >> automatically if my laptop is on battery? > This is strictly [OT] > still.... You can achieve this with laptop-mode-tools Ok, thanks. In the meanwhile I have created a script which did the job. #!/bin/sh # /etc/pm/power.d/backlight # set backlight brightness depending on power source LEVEL_AC=15 LEVEL_BAT=12 BRIGHT=/sys/class/backlight/acpi_video0/brightness case "$1" in true) level=$LEVEL_BAT ;; false) level=$LEVEL_AC ;; *) exit 0 # invalid argument esac [ "$(cat $BRIGHT)" != "$level" ] && echo -n $level > $BRIGHT exit 0 And sorry for the OT posting. Greets Marcus ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2