[Konversation-devel] Notify-send integration

Eike Hein hein at kde.org
Sat Jun 20 09:03:07 CEST 2009


Jeremy McEntire wrote:
> Dear developers,
> 
> I am using notify-send to send messages to ubuntu's notify-osd daemon
> and was wondering if the notification settings in Konversation
> understand any variables.

There are some variables, but they're not Konversation-specific,
as the "Configure Notifications" dialog is not provided by Kon-
versation but rather KDE's libraries.

A helpful "What's This?" help tooltip unfortunately seems to have
gotten lost in the transition from KDE 3 to KDE 4. I've attached
a screenshot of the KDE 3 version of the dialog. The bottom line
seems to be that you will need to use the %s parameter and do any
filtering/manipulation for advanced formatting yourself in a wrap-
per script.


> Also, I'd like to only receive such messages if Konversation is not my
> current focus -- that is, if I'm carrying on a conversation, I'd
> prefer to avoid too many notifications about that conversation. :)

Unfortunately changing that behavior would require you to edit
the code - specifically, notificationhandler.cpp - right now.

An alternative, albeit hacky and laborious, approach would be
to use the aforementioned wrapper script to check for whether
Konversation is the active window (using, say, wmctrl[1] and
perhaps make use of the tab name shown as part of the window
title to determine whether query tab for the author of the
message being considered is the active tab or not. This way
you could decide to only call notify-send when the query tab
is not the active tab or the Konversation window is not the
active window.

The active tab thing would only work for the "Private message"
notification, though - with the "Nick written" notification
there's the problem of not having the channel name in %s to
compare against the window title.

1 = http://tripie.sweb.cz/utils/wmctrl/


> Regards,
> Jeremy

-- 
Regards,
Eike Hein, hein at kde.org


More information about the Konversation-devel mailing list