Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was looking through an ArchLinux thread on URxvt, and I came across a setup at post #184 that I am going crazy looking for.

enter image description here

It looks like there's some kind of battery bar in the PS1, with a bitmap there too. I'm not all that new to Linux, but I can't find anything on how that's done.

It's fine if it's only for a specific shell, I would just like to know more about it.

share|improve this question
up vote 4 down vote accepted

It is a zsh shell prompt, and Oblique's configs are shared on github.

The basics of the prompt are:

# prompt theme
setopt prompt_subst
PROMPT='%{$fg[blue]%}[%D{%d/%m/%y} %T]%{$reset_color%} %(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m%{$reset_color%} %{$fg[magenta]%}[%(!.%1~.%~)]%{$reset_color%} $(_git_prompt_info)
%{$fg[red]%}>>%{$reset_color%} '
# use battery status only if we are in linux console
if [[ $TERM = linux* ]]; then

The battery status is a separate script and the graphics are created with unicode characters.

share|improve this answer
Fantastic! Thanks a ton! – mellowmaroon Dec 5 '12 at 3:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.