summaryrefslogtreecommitdiff
path: root/xmonad/checkmail.sh
blob: a760f3023f4489410eedfe61f083990474b33a51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
MAILS=$(echo x | mail -f /home/miguel/mail/default  | head -n 2 | tail -n 1 | cut -d" " -f 4-)
case $MAILS in
 *new*)
	echo "<fc=#f44>$MAILS</fc>"
 ;;
 *unread*)
	echo "<fc=yellow>$MAILS</fc>"
 ;;
 *)
	echo "no mail"
 ;;
esac