You are not logged in.

OhReally

Beginner

  • "OhReally" started this thread

Posts: 52

Location: Den Haag, NL

  • Send private message

1

Saturday, April 17th 2004, 12:39pm

[kopete] personalized notifications

Hi all,

I was wondering, are there any macros I can use when configuring kopete notifications?
I have a speech synthesizer installed (mbrdico), and would like to run a command like 'echo "%u is online" | /usr/local/bin/mbrdico.dutch.female' when a user comes online. Would this be possible?

Rob

2

Saturday, April 17th 2004, 1:03pm

<manual>
Configure Sounds & Events

Sounds, flashing taskbar entries, passive popups and more exotic notifications are supported in Kopete using the KDE notification system. Type help:/kcontrol/kcmnotify in Konqueror or select the Help tab in the System Notifications section of the KControl for more information.

You can use the ?Execute a program? notification to perform custom notifications. As an example, if you have XOSD (X On-Screen Display) installed, you can get OSD online notifications by executing the following command when the ?User goes online? event takes place:

echo %s | osd_cat -o 100 -p bottom -A center -f -*-helvetica-*-r-*-*-24-*-*-*-*-*-*-* -O 2 -c gold

</manual>

You could implement a buddy pounce feature by scripting to pull the contact name out of %s above and doing something specific to that person, if you want.

Bille
Will Stephenson
Kopete Developer

OhReally

Beginner

  • "OhReally" started this thread

Posts: 52

Location: Den Haag, NL

  • Send private message

3

Monday, April 19th 2004, 9:48am

Thanks Will.

All my manual and the manual at docs.kde.org had to say about Behaviour an Notifications is 'Behaviour and Notifications covers the way Kopete integrates with your desktop, ?Away? settings, and chat user interface options.'.

For those interested, this is the command I came up with. It's even simpler than I expected.

echo %s | /usr/local/bin/mbrdico.dutch.female

Of course, this needs a speech synthesizer installed (in my case mbrola [http://mambo.ucsc.edu/psl/mbrola/]).
Also, I had to pipe the string through sed, to spell 'online' more phonetic:
echo %s | sed -e 's/online/onlaain/i' | /usr/local/bin/mbrdico.dutch.female

Rob

4

Monday, April 19th 2004, 10:42am

Oops, I have the updated manual from CVS here, so I have a bit more information available. That's a neat use of sed to phoneticize. I'll add this to the manual.

Bille
Will Stephenson
Kopete Developer

OhReally

Beginner

  • "OhReally" started this thread

Posts: 52

Location: Den Haag, NL

  • Send private message

5

Tuesday, April 20th 2004, 1:36pm

1 additional note.
The nick used in %s is the nick you've set for a contact, not the nick chosen by the contact. This nick should, of course, be pronouncable by the speech synthesizer.
So, if a contact has a nick like '$&#^&*(^(%#' (and don't they all...), rename the contact to something alphabetic like his/her firstname.