legacy-dotfiles/.zsh/functions/prompt

17 lines
575 B
Text
Raw Normal View History

2012-01-11 21:26:00 +01:00
# -*- mode: shell-script; eval: (git-auto-commit-mode 1) -*-
local pac_cnt=$(get_cnt updates)
local aur_cnt=$(get_cnt aur)
local hostname=$(hostname | cut -d . -f 1)
if [ $pac_cnt -gt 0 -o $aur_cnt -gt 0 ]; then
printf "%s%d%s/%s%d%s:" \
"%{${fg[cyan]}%}" $pac_cnt "%{${fg[default]}%}" \
"%{${fg[cyan]}%}" $aur_cnt "%{${fg[default]}%}"
fi
2012-01-11 21:26:00 +01:00
printf '%s%s%s%s%s:%s%s%s ' \
"%(?.%{${fg[green]}%}^_^.%{${fg[red]}%})%B" "%b%{${fg[default]}%}T_T" \
"%{${fg[magenta]}%}" $hostname "%{${fg[default]}%}" \
2012-01-11 21:26:00 +01:00
"%{${fg[green]}%}" "%~" "%{${fg[default]}%}"