Add mailbox account

This commit is contained in:
2026-06-11 21:14:17 +02:00
parent 2a9fad1c35
commit 98f80757e0
4 changed files with 124 additions and 4 deletions
+5 -3
View File
@@ -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