[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freehoo-users] Re: Freehoo!!!
From: |
Anand Babu |
Subject: |
[Freehoo-users] Re: Freehoo!!! |
Date: |
Sun, 12 Dec 2004 01:23:54 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) |
,----[ Mrugesh Karnik <address@hidden> ]
| And speaking of the mail-reception hook, i'll
| appreciate it if you can add that :) Btw, what were
| you telling me about Sawfish that day?
`----
Done. Its in CVS. Documented in the info page.
-- Anand Babu
--- Anand Babu <address@hidden> wrote:
> > ;; Turn off built in bell audio
> > (fh-toggle! "bell")
> >
> > ;; play music for every music received
> > (define (receive-beep from msg)
> > "beep on receiving message"
> > (system "ogg123 ~/music/receive-event.oggA&"))
> > (add-hook! fh-message-receive-hook receive-beep)
> >
> > ;; play music for every music sent
> > (define (send-beep from msg)
> > "beep on send message"
> > (system "ogg123 ~/music/send-event.oggA&"))
> > (add-hook! fh-message-send-hook send-beep)
> >
>
> ,----[ Mrugesh Karnik <address@hidden> ]
> | Say, I define the hook for a message from
> "abindian"
> | as "ab-receive"
> | Then,
> | (add-hook! fh-message-receive-hook abindian
> | ab-receive)
> |
> | Is that part correct? Because the info says that
> | fh-message-receive-hook takes buddy and message as
> | arguments....
> `----
> Info page says your "ab-receive" procedure should
> accept 2 arguments
> "from" and "message". "add-hook!" primitive takes
> hook name
> "fh-message-receive-hook" and your hook procedure
> "ab-receive".
>
> So, it will look like,
>
----------------------------------------------------------------
> ;; play music for every music received
> (define (ab-receive from msg)
> "beep on receiving message"
> (system "ogg123 ~/music/receive-event.oggA&"))
>
> (add-hook! fh-message-receive-hook ab-receive)
>
----------------------------------------------------------------
>
> ,----[ Mrugesh Karnik <address@hidden> ]
> | Also, how do I add a different sound when I
> receive an
> | email?
> `----
> I have not exported any hook for mail-reception. If
> you are
> interested let me know, I can implement in few
> minutes.
>
> ,----[ Mrugesh Karnik <address@hidden> ]
> | Speaking of theses alerts, if I add a sound for
> all
> | the buddies and add a different one for one of
> them,
> | what would happen when that buddy sends a message?
> `----
> fh-message-receive-hook is called for all the
> receive events
> regardless of from whom you receive the message.
>
> Take a look at this customization. It plays a
> different tune for
> messages received from me and gnubot and default
> tune for the rest.
>
>
----------------------------------------------------------------
> ;; play music for every music received
> (define (my-receive-tunes from msg)
> "beep on receiving message"
> (cond ((string=? from "abindian")
> (system "ogg123 ~/music/receive-alert1.ogg&"))
> ((string=? from "gnubot")
> (system "ogg123 ~/music/receive-alert2.ogg&"))
> (#t
> (system "ogg123 ~/music/receive-alert2.ogg&"))))
>
> (add-hook! fh-message-receive-hook my-receive-tunes)
>
----------------------------------------------------------------
>
> You can keep adding more buddies below "gnubot".
> "#t" is default tune.
>
> Happy Hacking!
> --
> Anand Babu
> Free as in Freedom <www.gnu.org>
>
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
http://yahoo.shaadi.com/india-matrimony/
--
Anand Babu
Free as in Freedom <www.gnu.org>