.zsh/functions/prompt

This commit is contained in:
Tom Willemsen 2012-01-11 22:10:41 +01:00
parent 39968ad116
commit ac4c937a87

View file

@ -4,7 +4,10 @@ local pac_cnt=$(get_cnt updates)
local aur_cnt=$(get_cnt aur) local aur_cnt=$(get_cnt aur)
local hostname=$(hostname | cut -d . -f 1) local hostname=$(hostname | cut -d . -f 1)
line $hostname "$(date +%Y%m%d%H.%M)" printf "%s" \
"%B%(?.%{${fg[green]}%}^_^.%{${fg[red]}%}T_T)%b%{${fg[default]}%}"
line 4 15
printf "%s" "$(date +%Y%m%d%H.%M)"
if [ $pac_cnt -gt 0 -o $aur_cnt -gt 0 ]; then if [ $pac_cnt -gt 0 -o $aur_cnt -gt 0 ]; then
printf "%s%d%s/%s%d%s:" \ printf "%s%d%s/%s%d%s:" \
@ -13,6 +16,5 @@ if [ $pac_cnt -gt 0 -o $aur_cnt -gt 0 ]; then
fi fi
printf '%s %s%s%s:%s%s%s ' \ printf '%s %s%s%s:%s%s%s ' \
"%B%(?.%{${fg[green]}%}^_^.%{${fg[red]}%}T_T)%b%{${fg[default]}%}" \
"%{${fg[magenta]}%}" $hostname "%{${fg[default]}%}" \ "%{${fg[magenta]}%}" $hostname "%{${fg[default]}%}" \
"%{${fg[green]}%}" "%~" "%{${fg[default]}%}" "%{${fg[green]}%}" "%~" "%{${fg[default]}%}"