I am writting a BASH script to monitor a program's status. That program is close source and I have no control over it. It can create an icon in system tray.
What I need is knowing if currently there is an icon created by that program on system tray, so I get some infomation about that program.
How to list current system tray's all icons and their processes(PID)? Or how to get a PID's icon?
Update:
freedesktop.org's System Tray Protocol Specification and XEmbed Protocol Specification don't seem to provide any interface that allow people to list icons or proccesses. :(
stalonetray
seems to be doing this, so worst case we could probably dig into its source code. Currently, I'm lacking the time for that, though.