2014-08-15 13:43:49 +04:00
|
|
|
#!/bin/bash
|
|
|
|
# mymail_gmail_loop.sh
|
|
|
|
|
2014-08-15 20:24:13 +04:00
|
|
|
MAILDIR=/tmp/$USERNAME-mail_loop
|
2014-09-26 16:53:21 +04:00
|
|
|
mkdir --mode=700 $MAILDIR 2>/dev/null
|
2014-08-15 20:24:13 +04:00
|
|
|
|
2014-08-15 13:43:49 +04:00
|
|
|
while [ 1 ]; do
|
2014-09-26 16:53:21 +04:00
|
|
|
val=$(timeout -k 30 25 ~/.config/awesome/mail_loop_mymail.py)
|
|
|
|
if [[ "$val" == "" ]]; then val = "?"; fi
|
2014-08-15 20:24:13 +04:00
|
|
|
echo $val > $MAILDIR/mymail_count
|
2014-08-15 13:43:49 +04:00
|
|
|
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
|
2014-08-15 20:24:13 +04:00
|
|
|
echo $val > $MAILDIR/gmail_count
|
2014-08-15 13:43:49 +04:00
|
|
|
sleep 30
|
|
|
|
done
|