Mutt - switch to isync+msmtp.
This commit is contained in:
parent
adefd85151
commit
7f3e3168c6
2 changed files with 2 additions and 16 deletions
|
@ -1,17 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
[ ! -e ~/.local/share/passwords ] && echo "no accounts configured" && exit 1
|
||||
|
||||
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^"
|
||||
|
||||
printf "\uf7aa configure your way to check mail!"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue