[ltp] zsh prompt..

Peter Johanson linux-thinkpad@linux-thinkpad.org
Thu, 25 Sep 2003 11:21:59 -0700


On Thu, Sep 25, 2003 at 01:46:32PM -0400, Tom von Schwerdtner wrote:
> On Mon, Sep 22, 2003 at 04:05:26PM +0200, d.lj wrote:
> > [Tom von Schwerdtner]->[[ltp] zsh prompt..]->[03-09-21 22:21]
> > 
> >  |If anyone uses zsh, I made a thinkpad prompt that displays apm status and
> >  |cpu freq....
> > 
> > can it be ported to bash?

here's one i write a while ago to do apm stuff... gotta port it to acpi now that i have that mostly working on my laptop. This shows the percent, and makes it a different color if you're on AC or battery, and red percent if you're below 5%.

PS1="\[\033[01;3\`apm|awk '\$2~/on-line/{print "2"; exit}\$5~/high/{print "3"}\$5~/low/{print "1"}'\`m\]\`apm|awk '\$5~/%/{print \$5}\$6~/%/{print \$6}'\` \[\033[01;31m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]"


hth,

-pete
> 
> I don't know.  Zsh makes it very easy to build a fancy custom prompt.
>  
> > p.s. where to find it?
> 
> Oops.
> 
> http://home.etria.org/svn/tvon-config/.zsh/functions/prompt_thinkpad_setup
> 
> 
> -T



-- 
Peter Johanson
<latexer@gentoo.org>