Registered Member
|
Hi,
sorry if this was already answered somewhere, I couldn't find it. If I enable "run command" for a notification, the command is run without arguments. Is it possible to get some information about the notification in the command? More precisely, I want to have notifications from instant messaging (telepathy) into my script that displays them on my (XBMC) HTPC, so it would be useful If I could get who's the message from and things like that. Thanks |
Administrator
|
Based on this code from KNotify, you can use the following shell variables in the command:
$e: Name of the notification $a: Name of the sending application $s: Text of the notification itself $w: ID of the Window which sent the notification (useful for raising it to the top for instance, if given) $i: Unknown ID number, likely uniquely identifying the notification (would be used for cancelling or providing feedback with long term notifications).
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I find that % rather than $ works for me (Fedora 20, KDE 4.12.4).
%e: Name of the notification %a: Name of the sending application %s: Text of the notification itself %w: ID of the Window which sent the notification (useful for raising it to the top for instance, if given) %i: Unknown ID number, likely uniquely identifying the notification (would be used for cancelling or providing feedback with long term notifications). Use these tokens as arguments to your program and you can get extra information about the current notification message. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]