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 Oct 14, 2007, at 12:46 PM, wgscott@xxxxxxxxxxxxxxxxxx wrote:

On Sun, 14 Oct 2007 12:02:46 -0400
Michael Hernandez <sequethin@xxxxxxxxx> wrote:

     On Oct 14, 2007, at 9:26 AM, 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...

Thx and Regards,

What OS are you using? I have a mostly-working combination of scripts that shows me battery percentage on my mac. Also if you look at the clint prompt that is shipped with zsh there is some apm stuff in there.

     --Mike H

I just found this "battery" script of OS X that is even written in zsh!


Yes I use that with my zsh prompt, I have code to use battery to pull the percentage and then stick it on the right-hand-prompt. Also have it change colors from green to yellow to red depending on the percentage, and show whether or not I am plugged in (AC) or using battery (DC). For example (hopefully Mail.app doesn't wrap it horribly...

--INSERT-- :zsh-4.2.5: (Sun 10/14/2007 15:13 EDT)
:p2: % *AC* (99.8%)

The --INSERT-- is from visual vi mode...

I'm hoping that with leopard things don't change so much that it breaks my prompt :)

--Mike H

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