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

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

Re: battery status in modeline


From: Richard Riley
Subject: Re: battery status in modeline
Date: Fri, 16 Apr 2010 13:09:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

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






reply via email to

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