A Lightweight Low-Battery Warning Monitor for GTK+ 3.x desktops

A laptop’s battery gives us the comfort of storing power which we can use later. However, sometimes this comfort turns into pain.  For example, if we take our laptop with us, thinking that it’s charged (but it actually isn’t), or if we leave our laptop powered on and it silently turns off resulting in the loss of valuable work.

It is with this in mind that a programmer developed a simple battery monitor in Python with the following capabilities:

  1. The program should be customizable and lightweight.
  2. It should work in the background without any disturbance.
  3. It can allow the user to set a minimum charge threshold.
  4. Upon reaching that threshold, the program should not only display a desktop notification but also play a sound to force the user to plug in the charger.
  5. When the charger is connected, it should stop the notifications immediately but remain running to watch for future problems.

The program has been tested on Arch, Ubuntu and Mint, so, if this sounds like something you’d be interested in, why not give it a try!

Extend Laptop Battery Life

Found a great tip when doing some reading…

When running linux on a laptop, it’s a good idea to mount hard drive partitions with the -noatime option. This prevents extra writes to the hard drive every time a file is read. Add the noatime option to the entry in /etc/fstab.

Example (from /etc/fstab)
LABEL=/ / ext3 defaults,noatime 1 1

By default, access information on a file is updated every time that file is accessed, including just being read. It’s very rare that you’ll need this feature, and disabling it can result in a lot less disk-writing, which translates into an increase in performance and battery life.

Creative Commons License
Except where otherwise noted, the content on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.