knotify DCOP usage

Kevin Krammer kevin.krammer at gmx.at
Thu Mar 4 19:48:38 GMT 2004


On Thursday 04 March 2004 19:58, Miles Stevenson wrote:
> Anyone know how use the notify() dcop call for knotify? I'm not sure what
> the function is expecting for the "event" and "fromApp" arguments. Tried a
> few guesses, but didn't get the exepcted results.
>
> I ask because I'd like to call knotify through dcop using shell scripts. 
> I've seen this question asked before on the list but no responses. Google
> hasn't been much help either.

for examplelike this:
dcop --user kevin knotify default notify "" "" "Message" "sound.wav" "" 3 2

the last number changes the notification level, the number before is the 
notifcation type.
In the example 3 means message box and sound (1 + 2) and 2 means warning.

See the definition in knotifyclient.h (below the declaration of the Instance 
class)
http://tinyurl.com/28sws

If you know the window ID of a running application, you can even use passive 
popup, like KMail can do for "new mail" messages.

dcop knotify default notify "" "" "test" "" "" 16 1 39845930

16 means passive popup, 39845930 is the decimal window ID
This is highly theoretical as it isn't easy to get the window ID in a script.

I think the fromApp parameter, where I used just an empty string, can be used 
to have this applications Icon in the message.

Cheers,
Kevin

-- 
Kevin Krammer <kevin.krammer at gmx.at>
Qt/KDE Developer, Debian User
www.mrunix.de - Unix/Linux programming forum
www.qtforum.org - Qt programming forum
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde/attachments/20040304/2cb03bec/attachment.sig>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


More information about the kde mailing list