Emacs display-battery-mode

I have occasionally run across the Emacs display-battery-mode command—it’s in Aaron Hawley’s excellent reference sheet, for example. I never bothered really looking at it because my MacBook Pro already has an battery status icon on the menu bar. Today, out of curiosity, I played around with it a little and discovered it can actually be useful in my situation. The Mac’s battery icon can display time remaining or percentage charge but not both. I have it display time remaining because that seems the most useful to me but sometimes I click on it and ask it what percentage of the charge remains. By using battery-display-mode I get the percentage displayed in Emacs and the time on the menu bar—the best of both worlds.

Actually, the display-battery-mode command is configurable—it’s Emacs after all—so you can display pretty much whatever information you want by editing the format-like battery-mode-line-format string. If you’d like additional information about your battery status displayed or if you have a Linux system and don’t want to take up room with a battery status widget, this could be just what you need.

This entry was posted in General and tagged . Bookmark the permalink.