summaryrefslogtreecommitdiff
path: root/xmonad/checkmail.sh
blob: a8037e5b65b8d87755731a9b88699f2e65e0925e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
MAILS=$(echo x | mail -f /home/miguel/mail/default  | head -n 1 | tail -n 1 | cut -d" " -f 4-)
A="<action=xterm -e mutt>"
B="</action>"
case $MAILS in
 *new*)
	#echo "$A<icon=/home/miguel/git/dotfiles/xmonad/mail.xpm/><fc="#dc322f">$MAILS</fc>$B"
	echo "$A<fc="#b58900"><fn=1></fn> $MAILS</fc>$B"
 ;;
 *unread*)
	echo "$A<fc="#b58900"><fn=1></fn> $MAILS</fc>$B"
 ;;
 *)
	#echo "$A<fc="#93a1a1"><fn=1></fn>$MAILS</fc>$B"
	echo "$A<fc="#93a1a1"><fn=1></fn></fc>$B"
 ;;
esac