Mutt - switch to isync+msmtp.

This commit is contained in:
Bartek Stalewski 2022-04-23 13:25:06 +02:00
parent adefd85151
commit 7f3e3168c6
2 changed files with 2 additions and 16 deletions

View file

@ -1,17 +1,3 @@
#!/bin/bash #!/bin/bash
[ ! -e ~/.local/share/passwords ] && echo "no accounts configured" && exit 1 printf "\uf7aa configure your way to check mail!"
unread=0
for i in $(cat ~/.local/share/passwords); do
user=$(echo "$i" | awk -F':' '{print $1}')
pass=$(echo "$i" | awk -F':' '{print $2}')
count=$(curl -s --user "${user}:${pass}" https://mail.google.com/mail/feed/atom/ | grep -oPm1 "(?<=<title>)[^<]+" | sed '1d' | wc -l 2>/dev/null)
[ $count -ne 0 ] && export unread=$((unread + count))
if [ $user = 'ftpd@insomniac.pl' ]; then
scount=$(curl -s --user "${user}:${pass}" https://mail.google.com/mail/feed/atom/sites | grep -oPm1 "(?<=<title>)[^<]+" | sed '1d' | wc -l 2>/dev/null)
[ $scount -ne 0 ] && export unread=$((unread + scount))
fi
done
[ "$unread" -ne 0 ] && printf "\uf7aa ^c#ffffff^^b#005577^new mail: ${unread}^d^"

View file

@ -2,7 +2,7 @@
static const Block blocks[] = { static const Block blocks[] = {
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
{"", "sb-emerge", 1, 0 }, {"", "sb-emerge", 1, 0 },
{"", "sb-mail", 60, 16 }, {"", "sb-mail", 1, 0 },
{"", "sb-vol-in", 0, 10 }, {"", "sb-vol-in", 0, 10 },
{"\uf028 ", "sb-vol-out", 0, 12 }, {"\uf028 ", "sb-vol-out", 0, 12 },
{"\uf241 ", "sb-battery", 3, 0 }, {"\uf241 ", "sb-battery", 3, 0 },