summaryrefslogtreecommitdiff
path: root/xmonad/checkmail.sh
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-05-29 20:28:06 +0200
committerMiguel <m.i@gmx.at>2018-05-29 20:28:06 +0200
commitbd0c6bc05c529e90317e9b3d6f0ba7890a1ebca3 (patch)
treed56f3340384b6a81f1e2cba8b1ae3f90ffb8d15f /xmonad/checkmail.sh
parent68b54b0d1729cd036fcba1c85f85ad4af6e9e3dc (diff)
add xmonad stuff
Diffstat (limited to 'xmonad/checkmail.sh')
-rwxr-xr-xxmonad/checkmail.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/xmonad/checkmail.sh b/xmonad/checkmail.sh
new file mode 100755
index 0000000..a760f30
--- /dev/null
+++ b/xmonad/checkmail.sh
@@ -0,0 +1,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
+