dotfiles

config files for my linux setup
git clone git://edryd.org/dotfiles
Log | Files | Refs | README

dwmmail.sh (405B)


      1 #!/usr/bin/env bash
      2 
      3 fetchmail --check 2>/dev/null | while read line; do
      4     new=$(echo "$line" | sed 's/(//' | awk '{print $1-$3}')
      5     if [ "$new" != 0 ] && [ ! -e ~/.dwm.msg ]; then
      6         echo "New mail($new)" > ~/.dwm.msg
      7         echo "!!! !!! !!!" >> ~/.dwm.msg
      8         sleep 5
      9         if grep '^New mail' ~/.dwm.msg >/dev/null 2>/dev/null; then
     10             rm -f ~/.dwm.msg
     11         fi
     12     fi
     13 done