This commit is contained in:
天クマ 2025-12-18 12:09:34 -03:00
commit c8734e660a
392 changed files with 21043 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#!/bin/bash
# Server and mail adress are defined with credentials in ~/.netrc
SERVER="$(head -1 ~/.netrc | awk '{print $2}')"
INBOX=$(curl --netrc -X "STATUS INBOX (UNSEEN)" imaps://$SERVER/INBOX | tr -d -c "[:digit:]")
if [ $INBOX ] && [ $INBOX -gt 0 ] ; then
if [ $INBOX -eq 1 ] ; then
echo "<big></big> $INBOX"
notify-send -i mail-unread-symbolic "Thunderbird" "You have an unread e-mail."
else
echo "<big></big> $INBOX"
notify-send -i mail-unread-symbolic "Thunderbird" "You have $INBOX unread e-mail."
fi
fi