I am currently using cinnamon on ubuntu 14.04. I have an email client that is showing a little icon in the notification tray every time I receive an email.
I want to know if there is a way of capturing the process that is causing that behaviour and do something else. (e.g. my laptop has a small led attached to it and I would like to make it start blinking).
If I can't find the process it would be also very useful if I can check what items I have in the tray bar and trigger a custom script when I find the icon I am looking for.
I want to do this programmatically so I can make it part of a script.
Pretty picture of my tray bar above so you know what I am referring to.