~ben/bin

ref: d28b372fc6a7f4a549687f33ebe4a34b2434ee3f bin/eml -rwxr-xr-x 191 bytes View raw
d28b372fBen Sima fix email unread script 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env bash

count=$(notmuch count tag:inbox and tag:unread)

case "$1" in
    -n) [[ $count > 0 ]] && notify-send "New mail" "$count messages" ;;
    *) echo $count ;;
esac

exit 0;