Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: To have cpu frequency or/and battery state percentage in my prompt



On Sun, 14 Oct 2007, giggz wrote:

I search ideas to have a good prompt which display the cpu frequency or/and the battery state in my zsh prompt.

So if you have ideas and examples which I can put in my zshrc...
=================

i've got this (in colors, depending on battery state and level of charge) on FreeBSD 6.2 (acpi). if anyone wants details i'll post...

short version: root runs a cron job every minute to get the battery state; this is written to a file in /tmp; the prompt looks for this file; if it's there it becomes part of the prompt.


--
        ...atom

 ________________________
 http://atom.smasher.org/
 762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
 -------------------------------------------------

        "The livestock sector is a major player [in climate
         change], responsible for 18% of greenhouse gas
         emissions measured in CO2 equivalent. This is a higher
         share than transport."
                -- Livestock's long shadow, 2006
                UN report sponsored by WTO, EU, AS-AID, FAO, et al



Messages sorted by: Reverse Date, Date, Thread, Author