Getting unread notifications from script
It is possible to send notfications with D-Bus.
But how can I get unread notifications from script? I would like to add printing unread notifications titles to my .bash_profile to see what I have missed when I SSH to my Jolla. |
Re: Getting unread notifications from script
This is possible with a non-standard Lipstick extension to the notification interface:
https://github.com/nemomobile/lipsti...anager.xml#L39 Unfortunately the complicated type of the return value from that function might make reading from the command line difficult. I hope someone figures it out. |
Re: Getting unread notifications from script
easier just creqte qt helper who will print you notifications, but you may use python also
|
Re: Getting unread notifications from script
Thank you for the pointers. I got a bit further
To get list of e-mail notifications: Code:
dbus-send --print-reply --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.GetNotifications string:"messageserver5" Ewww, I would like to find a way to get just all notifications. |
Re: Getting unread notifications from script
I'm working on a little Qt console application for this :)
How should the output look like? Any suggestions? Currently, I iterate simply over the list and print something like: Code:
1: Incoming: 192.168.10.10 |
Re: Getting unread notifications from script
you need to add appname here
|
Re: Getting unread notifications from script
Quote:
%a - application name %t - message title %b - message body %c - count %i - id %ps - preview summary %pb - preview body <here should be a few more> As default format I propose following string "%a - %c %t\n%b\n\n" It should be handy to add a couple shorthand switches for common variants of requests. Like --oneline for --format "%a - %c %t\n" and --raw for complete listing of all parameters of notification. |
All times are GMT. The time now is 23:18. |
vBulletin® Version 3.8.8