From: Richard Riley <rileyrgdev@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: battery status in modeline
Date: Fri, 16 Apr 2010 13:09:40 +0200 [thread overview]
Message-ID: <n4tl97-jfb.ln1@news.eternal-september.org> (raw)
In-Reply-To: m14ojbn2nj.fsf@gmail.com
Andrea Crotti <andrea.crotti.0@gmail.com> writes:
> 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?
>
>
>
>
>
This is a good example of using apropos help. Big word for commonly
requested feature. Find any commands including a certain word.
For me:
,----
| C-h a runs the command apropos, which is an interactive compiled Lisp
| function in `apropos.el'.
`----
Type in "battery" and Bob's your Uncle ;)
hth
prev parent reply other threads:[~2010-04-16 11:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 9:54 battery status in modeline Andrea Crotti
2010-04-16 10:35 ` 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 [this message]
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=n4tl97-jfb.ln1@news.eternal-september.org \
--to=rileyrgdev@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).