update mutt config

This commit is contained in:
lelgenio 2020-12-03 23:53:41 -03:00
parent 43c270e596
commit daebb1b16b
2 changed files with 18 additions and 15 deletions

View File

@ -27,13 +27,7 @@ set postponed = "+Drafts"
set trash = "+Trash"
mailboxes \
"=INBOX" \
"=INBOX.Faculdade"\
"=INBOX.Trabalhos" \
"=INBOX.Contas"\
"=INBOX.Git" \
"=INBOX.Duolingo" \
"=INBOX.LBRY"\
`echo ~/.local/share/mail/INBOX*` \
"=Sent" \
"=Drafts" \
"=Trash" \
@ -154,7 +148,7 @@ set markers = no # Disables the `+` displayed at line wraps
set date_format="%m/%d %H:%M"
set index_format="%2C %zs %?X?A& ? %D %-15.15F %s"
# set display_filter = 'sed -e "s/ */\n/g"'
set display_filter = 'sed -e "s/ */\n/g"'
#}}}
# colors{{{
@ -196,4 +190,4 @@ color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-
# }}}
# }}}
# vim: filetype=neomuttrc:foldmethod=marker
# vim: ft=sh

View File

@ -1,27 +1,36 @@
#!/bin/sh
set -e
test "$XDG_CURRENT_DESKTOP" = "gnome" &&
exit 0
test -z "$XDG_RUNTIME_DIR" &&
export XDG_RUNTIME_DIR=/run/user/$(id -u)
getnew(){
find ~/.local/share/mail/INBOX{,.{Contas,Faculdade,Git,Trabalhos}}/new -type f | wc -l
pushd "~/.local/share/mail/"
find INBOX*/new -type f |
wc -l
popd
}
OLD=$(getnew)
[ "$1" = "update" ] && mbsync -a
[ "$1" = "update" ] &&
mbsync -a
NEW=$(getnew)
if [ "$NEW" -gt "$OLD" ];then
[ "$NEW" -gt "$OLD" ] &&
notify-send " New E-Mails!"
fi
echo $NEW | sed 's/^0$//'
if [ "$(ps -o comm= $PPID)" != "waybar" ] && pidof waybar>/dev/null;then
[ "$(ps -o comm= $PPID)" != "waybar" ] &&
pidof waybar>/dev/null &&
pkill -SIGRTMIN+4 waybar
fi
# vim:ft=sh