Subject: FVWM: Audio with fvwm

From: "Mike A. Harris" <[email-masked]>
Date: Thu, 12 Dec 1996 22:28:39 -0500

I'd like to assign audio files to different events in fvwm.  Is it
possible?  If so how?  For example:  How would I set it up so that when
I get incoming mail a file called you_have_mail.au is played?

Thanks in advance.
-- 

Mike A. Harris  -  [email-masked], [email-masked]
The Ultimate: Linux 2.0.26, DOSemu, 4DOS 5.50c, DJGPP 2.01, Borland C
3.1

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Albrecht Kadlec)
Date: Fri, 13 Dec 96 15:08:37 +0100

>>>>> Mike A Harris writes:

M> I'd like to assign audio files to different events in fvwm.  Is it
M> possible?  
it is for fvwm events (FvwmAudio module)

M> If so how?  For example:  How would I set it up so that when
M> I get incoming mail a file called you_have_mail.au is played?
mail arrival is not an fvwm event.
But when mail is received, the demon looks for ~/.forward.
Usually a mail forward address is put there, but you can also start a
command from there.
Make this a batchfile and put some playaudio command there (or better
send a command to your fvwm to play sth, since another user would be
quite surprised if the demon was invoked while you're not there.)

So:
~/.forward:
|~albrecht/.mailfilter

~/.mailfilter (shortened):
#!/usr/local/lbin/tcsh -f
# 
# Mail filter for various mail services with vaction support.
#
############### CONFIGURATION SECTION ###################################
#
# USER DATA
# must be set because $USER is 'root' and $HOME is the home dir. from 'root'
#

setenv USER albrecht
setenv HOME ~albrecht

#########################################################################
umask 077
set tmpf=/tmp/mail_$$

# copy stdin (piped in from .forward) to tmpfile to work on
cat >$tmpf

#########################################################################
#
#	grep for mailing list adresses and copy to separate files
#
#########################################################################

egrep -s -e '^Sender: owner-fvwm-workers@' $tmpf
if ($status == 0) then
  cat $tmpf >> $HOME/fvwm2worker
  goto cleanup
endif

egrep -s -e '^Sender: owner-fvwm@' $tmpf
if ($status == 0) then
  cat $tmpf >> $HOME/fvwm2
  goto cleanup
endif

#########################################################################
#
#				NORMAL MAIL
#
#########################################################################

cat $tmpf >> /usr/spool/mail/$USER

# this is to prepare fetching mail (not mailing lists) via modem - FAST !!!
/usr/local/bin/zip -k9 $HOME/mail.zip $tmpf

cleanup:

/bin/rm -f $tmpf

exit 0

so simply add

	if [ -p ~/.fvwmpipe ] then
	# or any other test to check if fvwm2 is running under your account
	# e.g exit code of: ps -axu | grep $User | grep fvwm2

		playaudio $HOME/mail_has_come_my_master.au

	# If your host is not the host receiving mail, you should
	# better send the command to fvwm2 for execution (via FvwmPipe)
		echo exec playaudio $HOME/mail_has_come_my_master.au >>~/.fvwmpipe 
	endif

on the top.

hope this helped,
albrecht
-- 
Well I've always had a deep respect, and I mean that most sincerely.
The band is just fantastic, that is really what I think. Oh by the way,
   which one's Pink?						-- Pink Floyd
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mark Boyns <[email-masked]>
Date: 13 Dec 1996 06:54:46 -0800

> I get incoming mail a file called you_have_mail.au is played?

The FvwmAudio module can play sounds for fvwm events like, open
window, close window, iconify, etc.

Playing sounds for mail delivery should be done with your .forward file.
Try something like this:

\mharris, |"/usr/local/bin/play you_have_mail.au"