[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

procmail script question



I use the following procmail script to make festival speak the FROM and SUBJECT headings of new email through my speakers:

SUBJECT=`formail -xSubject: \
| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
SENDER=`formail -xFrom: \
| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
:0c
| echo "New mail from " $SENDER ". the subject is " $SUBJECT | festival --tts

That works great.  However I am often listening to my vorbis collection.  When my music is playing and a new email comes in, the festival output just gets garbled with the music.  I would like to set up a procmail script that says

if xmms is playing:
	xmms -u #pause xmms

process new email

if xmms was playing:
	xmms -p #start playing again

I just don't know how to test for a process, and the two books I have on the subject are too basic, or I'm missing the page.  Any help appreciated.

-Lang


-- 
"Plan to throw one away.  You will anyway."
- Fred Brooks, "The Mythical Man Month"



Reply to: