Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
    RPROMPT='$(_battery_status)'
fi

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
add comment

Your Answer

 
discard

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.