How can I add a custom item to the Sound Indicator (and make it clickable more than once)?
By running dconf-editor from the dconf-tools we may incorporate an MPRIS complatible media player application to the sound menu with the key "com.canonical.indicator.sound.interested-media-players".
In the example here test
was included which points to a test.desktop
file in ~/.local/share/applications
where we can run our appplication from the Exec=
field. Restart your session to take effect.
As an entry in this menu is closely related to a media player, application control is done by DBus session bus com.canonical.indicator.sound. This is why we will not be able to re-run a script until a reset of the indicator was done. I succeeded to restart the test application after performing Shutdown() on the org/ayatana/indicator/service object but this is quite a hack and definitely not the way the indicator sound menu should be used.
It may however point to the right direction. i.e. we need to make use of DBus for our script or application we want to reside in the sound indicator menu.