Closed pawelma closed 4 years ago
That should be possible yes. Do you want to get the stream of all notifications sent over DBus, or are you refering to the NotificationClosed signal?
All of them :). NotificationClosed signal can probably be handled with current eventLoop implementation but I have to react right after notification appear.
You can already get the NotificationClosed signal: https://github.com/esiqveland/notify/blob/master/example/main.go#L80
But remember that this signal is only for dismissed notifications, not when they are dismissed by clicking an action button.
I saw this event handling before when I was playing with your example. But I need react to NotificationSend (or however this event is named) right after signal is send.
It should work like dbus-monitor
which produce following output on notify-send test text
command:
$ dbus-monitor "interface='org.freedesktop.Notifications'"
...
method call time=1487927837.852070 sender=:1.1011 -> destination=:1.24 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
string "notify-send"
uint32 0
string ""
string "test"
string "text"
array [
]
array [
dict entry(
string "urgency"
variant byte 1
)
]
int32 -1
...
This is something I could add. Please submit a PR if you feel called ;)
I see that this could be useful, but it is not part of the Notification spec nor exposed as a signal in the DBus service.
Closing for now.
Hi. Is it possible to add implementation of notification subscriber to your code. I know you already have
eventLoop
but 'notificationDelivery' event is missing. I'd like to implement listener of all incoming notifications.