unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Andrea Crotti <andrea.crotti.0@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: battery status in modeline
Date: Fri, 16 Apr 2010 11:54:24 +0200	[thread overview]
Message-ID: <m14ojbn2nj.fsf@gmail.com> (raw)

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	other threads:[~2010-04-16  9:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16  9:54 Andrea Crotti [this message]
2010-04-16 10:35 ` battery status in modeline Eli Zaretskii
2010-04-16 12:16   ` Andrea Crotti
2010-04-16 12:19   ` Andrea Crotti
2010-04-16 12:44     ` Richard Riley
2010-04-16 15:19     ` Peter Dyballa
2010-04-16 16:30       ` Johan Busk Eriksson
2010-04-16 17:51         ` Peter Dyballa
2010-04-16 11:09 ` Richard Riley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m14ojbn2nj.fsf@gmail.com \
    --to=andrea.crotti.0@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).