My goal is to write a desktop gui application that will utilize these commands found in https://askubuntu.com/a/14083/18330
pacmd list-sinks to list name or index number of possible sinks
pacmd set-default-sink "SINKNAME" to set the default output sink
pacmd set-default-source "SOURCENAME" to set the default input
pacmd set-sink-volume index volume
pacmd set-source-volume index volume for volume control (0 = Mute, 65536 = 100%)
Then the application will have a tray icon that shows a list of sound devices that will be clickable to switch the sound device to that one. As they are clicked the sound volume will fade volume from 0 to the point the current system's volume (therefore I need access to the system volume as well.)
Unknowns:
- How to programmatically add a tray icon in c++
- How to make a drop down display when clicked on that tray icon and have it display items that are also clickable (much like how the mail icon displays Thunderbird)
- How to bind the click events to a c++ function that will run (in order to switch to that sound device I will have a c++ function ready.)
I just need some guidance about identifying the desktop component that I'm trying to manipulate and where to find the API documentation for it.
Notes:
- Using Ubuntu 14.04 LTS amd64
- Going to write this as an open source Node.js extension written in C++
- This is an example of notifications written as a Node.js C++ extension
appindicator
.