P17 /zprmpt

# file ~/zsh/zprmpt
#
# colors
BL="$fg_bold[blue]"
WH="$fg_bold[white]"
CY="$fg_bold[cyan]"
RD="$fg_bold[red]"
YL="$fg_bold[yellow]"
GR="$fg_bold[green]"

# Titlebar
if [[ $TERM = "xterm" || $TERM = "rxvt-unicode" ]]; then
 PR_TITLEBAR=$'%{\e]0;%n@%m:%~ | %y\a%}'
  elif [ $TERM = "linux" ]; then
    PR_TITLEBAR=""
fi

# the prompt
PROMPT="$PR_TITLEBAR%(?,,%{${RD}%}%?)%{${BL}%}[%{${CY}%}%n%{${BL}%}@%{${CY}%}%m%{${WH}%}:%{${GR}%}%(4c,./%1~,%~)%{${BL}%}] %{${WH}%}%# "
export PROMPT