Hi, excuse me for the bad English... I created a simple gmail watcher
script/solution, because the gmail watcher extension to the Firefox no more
developed.

 Gmail Watcher — without Firefox, from commandline!


Under Sabayon distro:

emerge fetchmail


 To the $HOME/.fetchmailrc file:


 poll imap.gmail.com port 993 protocol IMAP username "usern...@gmail.com"
password "MySecretPassword" keep ssl


Create a script:

#! /bin/bash

 UZENET=`fetchmail -f /home/vz/.fetchmailrc --check | tr "(" " " | tr ")" "
" | sed 's/ \+/ /g'`

OSSZESEN=`echo "$UZENET" | cut --delimiter=" " -f1`

OLVASOTT=`echo "$UZENET" | cut --delimiter=" " -f3`

OLVASATLAN=`expr $OSSZESEN - $OLVASOTT`

if [[ $OLVASATLAN != 0 ]] ; then

ogg123 -q /Programs/Szkriptjeim/audio/ApuciLeveledJott_hangosabb.ogg

fi


 Save this script to a good place, for ekzample to the
/Programs/Szkriptjeim/0.0.0/bin/levelemjott

chmod this file as executable.

As root:

gpasswd -a YourUserName cron

gpasswd -a YourUserName crontab


Create a simple text file, with this line:


 */2 * * * * /Programs/Szkriptjeim/0.0.0/bin/levelemjott


 The  */2 means, that the script check your emails in every 2 minutes.

Create a $HOME/cron directory, and save into them this textfile above, with
name: "levelemjott".

Write to the $HOME/.xinitrc this line:

crontab /home/YourUserName/cron/levelemjott

Reboot, and enjoy!

Reply via email to