Wedding Countdown

It is currently 193 days (4644 hours) until our planned wedding day.

Battery Saving Applications

I've been trying to get maximum battery life out of my computer. Right now I only get about 3 hours under light use plus IRC and Pidgin.

Honestly, one of the best ways to save battery power is just to use different programs that do the same thing. I switched to using OpenBox.

I previously made a post about the desktop environment taking a lot of power. Linux Power Saving This change has saved me a LOT of battery life.

The applications you choose to launch can have a significant impact on your battery life. For example, running firefox over xlinks will drain your battery much much faster.

So. Simple answer, when you're running on battery power, use your light weight applications over your heavy ones.

Links2/Epiphany over Firefox
Finch over Pidgin
Irssi over XChat
Thunar over Nautilus
Mutt over Thunderbird
Nothing over gnome-settings-daemon
- Don't use it unless you're in Gnome

This will substantially improve battery life. Especially if you're using OpenBox over Gnome.

Of course, you don't want to have to choose what you're opening. It would be pretty nice if you just had a way to transparently decide what you are going to launch.

I created a script that you can just drop into /usr/local/sbin/ that I attached to this blog. Make sure the file is executable when you put it there.

The script handles two methods of giving it application names.
usage: bateval [l/c] [ac prog] [bat prog]

If you pass it l, the script will search for the application. If you pass it a c, the script will execute the exact parameter you pass it. The c is useful in cases where you have extra parameters to pass to the program.

If you are on AC power, the script will launch the first application. If you are on battery power, the script will launch the second application.

Examples:

bateval l gnome-terminal xterm

This will check to see if I'm on ac power or not. If I am, it will find where gnome-terminal exists and launch it. If I'm on battery power, it will find where xterm exists and launch it.

bateval c /usr/bin/pidgin "/usr/bin/gnome-terminal --hide-menubar -t Finch -e finch"

Notice the change from l to c. Instead of searching for the application, the script will execute the exact code I write. Many times, it is still OK to just throw in the program rather than the full path, but be warned that this can cause issues.

I use this script in menus. Instead of trying to choose between pidgin or finch, I just have one menu entry called, "Instant Messenger." That menu entry executes the same line listed above.