.awesome/mail_loop.sh

17 lines
426 B
Bash
Raw Normal View History

#!/bin/bash
# mymail_gmail_loop.sh
2014-10-14 18:55:09 +04:00
MAILDIR=/tmp/$USER-mail_loop
while [ 1 ]; do
mkdir --mode=700 $MAILDIR 2>/dev/null
2014-09-26 16:53:21 +04:00
val=$(timeout -k 30 25 ~/.config/awesome/mail_loop_mymail.py)
if [[ "$val" == "" ]]; then val = "?"; fi
echo $val > $MAILDIR/mymail_count
sleep 30
2014-09-26 16:53:21 +04:00
val=$(timeout -k 30 25 ~/.config/awesome/mail_loop_gmail.py)
if [[ "$val" == "" ]]; then val = "?"; fi
echo $val > $MAILDIR/gmail_count
sleep 30
done