I need to read the gnome-shell notifications to send an e-mail whenever event X happens (like a torrent was successfully downloaded). Is there a file or a callback that I can read/set in C code?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A very easy option would be to call the
notify-sendtool from your code. It is used like this:For more information, see the accompanying man-page.
Edit: I first read this question wrong and thought you wanted to send notifications. For reacting to notifications, I would suggest writing a
gnome-shellextension. There is already an example extension that shows how to react to all notifications.I am not aware of any callbacks for your own code, sorry. But you could probably roll your own notification callback via
DBUS. See the DBUS homepage for more details. In short, your shell extension could generate an appropriateDBUSmessage, to which your program then could react.Sorry for my reading error 🙂