help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

battery status in modeline


From: Andrea Crotti
Subject: battery status in modeline
Date: Fri, 16 Apr 2010 11:54:24 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.90 (darwin)

The only real reason to run X on my little dell 10 is because I know how
much battery I have left.
But now I've done this

--8<---------------cut here---------------start------------->8---
(defun bat()
  (interactive)
  (shell-command "grep 'present rate' /proc/acpi/battery/BAT1/state"))
--8<---------------cut here---------------end--------------->8---

And maybe I don't need it anymore, it would be really nice to show in
the modeline how much battery power I have left.

Given that the modeline is already crowded also I could show it only
when reaching a certain threshold.  Is there anything like that already
done?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]