add mail to prompt again

This commit is contained in:
Felix Van der Jeugt 2021-03-16 11:37:19 +01:00
parent da17f79fec
commit cc8184a717
No known key found for this signature in database
GPG Key ID: 58B209295023754D

8
yashrc
View File

@ -43,10 +43,16 @@ prompt_status() {
prompt_date() {
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."
GREEN="\fg."
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 GREEN
unset RESET