An extension for gnome shell that will change the screen brightness when the machine is running on battery power.
In the default dim-by-value mode, the screen will be dimmed to 50% brightness when running on battery. When the brightness is changed, the new brightness level will be remembered whenever you're on battery power.
In the new dim-by-percent mode, the screen will be dimmed to 50% of the ac brightness level. If your brightness is 75% when you are plugged in, once you are on battery power, your brightness will now be 38%. This is useful in environments where the light level changes frequently.
git clone git://github.com/nailfarmer/gnome-shell-dim-on-battery-extension.git
cd gnome-shell-dim-pn-battery-extension
cp -r [email protected] ~/.local/share/gnome-shell/extensions