Add mailbox account
This commit is contained in:
+5
-3
@@ -220,18 +220,20 @@ done
|
||||
|
||||
# Count number of new mails before retreiving mails
|
||||
gmail_old="$(ls ~/.local/share/mails/gmail/Inbox/new | wc -l)"
|
||||
mailbox_old="$(ls ~/.local/share/mails/mailbox/Inbox/new | wc -l)"
|
||||
esrf_old="$(ls ~/.local/share/mails/esrf/Inbox/new | wc -l)"
|
||||
|
||||
# Retreive mails
|
||||
mbsync -c /home/thomas/.config/isync/mbsyncrc $opt_all $opt_verbose gmail-Home esrf-Home 2>/tmp/mbsync.log
|
||||
mbsync -c /home/thomas/.config/isync/mbsyncrc $opt_all $opt_verbose gmail-Home mailbox-Home esrf-Home 2>/tmp/mbsync.log
|
||||
|
||||
# Count number of new mails after retreiving mails
|
||||
gmail_new="$(ls ~/.local/share/mails/gmail/Inbox/new | wc -l)"
|
||||
mailbox_new="$(ls ~/.local/share/mails/mailbox/Inbox/new | wc -l)"
|
||||
esrf_new="$(ls ~/.local/share/mails/esrf/Inbox/new | wc -l)"
|
||||
|
||||
# Notification if there are new retreive mails
|
||||
if [ "$(($esrf_new+$gmail_new))" -gt "$(($esrf_old+$gmail_old))" ]; then
|
||||
dunstify --replace=98465 'Mails ' "$(($gmail_new+$esrf_new)) new mail(s)"
|
||||
if [ "$(($esrf_new+$mailbox_new+$gmail_new))" -gt "$(($esrf_old+$mailbox_old+$gmail_old))" ]; then
|
||||
dunstify --replace=98465 'Mails ' "$(($gmail_new+$mailbox_new+$esrf_new)) new mail(s)"
|
||||
fi
|
||||
|
||||
# Indexation and Tags
|
||||
|
||||
Reference in New Issue
Block a user