Last active
October 29, 2015 08:02
-
-
Save typingincolor/53bff2b8f96a26a2a921 to your computer and use it in GitHub Desktop.
blink if you have mail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function f_curl { | |
curl -s -X "SEARCH UNSEEN" -k -u $1:$2 --url $3 | |
} | |
f_curl $username $password imaps://$host/INBOX | awk '{if (NF > 2) system("/usr/local/bin/blink1-tool -q --rgb=#FF0000 --blink 3");}' | |
f_curl $username $password imaps://$host/INBOX | awk -v host="$host" -F '{print host ":\t", NF - 2}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment