add mail to prompt again
This commit is contained in:
parent
da17f79fec
commit
cc8184a717
8
yashrc
8
yashrc
@ -43,10 +43,16 @@ prompt_status() {
|
|||||||
prompt_date() {
|
prompt_date() {
|
||||||
date +%H:%M:%S
|
date +%H:%M:%S
|
||||||
}
|
}
|
||||||
|
prompt_mail() {
|
||||||
|
#unread="$(mpick -t '! seen' | wc -l)"
|
||||||
|
unread="$(mlist -s $(mdirs /data/mail) | wc -l)"
|
||||||
|
[ "$unread" -eq 1 ] && printf ' (1 mail)'
|
||||||
|
[ "$unread" -gt 1 ] && printf ' (%s mails)' "$unread"
|
||||||
|
}
|
||||||
BOLD="\fo."
|
BOLD="\fo."
|
||||||
GREEN="\fg."
|
GREEN="\fg."
|
||||||
RESET="\fD."
|
RESET="\fD."
|
||||||
PS1="$BOLD[\$(ks prompt_date)]$RESET $GREEN\$(ks prompt_pwd)$RESET\$(ks prompt_git)\$(ks prompt_agent) \$(prompt_status) "
|
PS1="$BOLD[\$(ks prompt_date)]$RESET $GREEN\$(ks prompt_pwd)$RESET\$(ks prompt_git)\$(ks prompt_agent)\$(ks prompt_mail) \$(prompt_status) "
|
||||||
unset BOLD
|
unset BOLD
|
||||||
unset GREEN
|
unset GREEN
|
||||||
unset RESET
|
unset RESET
|
||||||
|
Loading…
Reference in New Issue
Block a user