sinks and sources can be changed simultaneously #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fantastic tool! You advertise it as "switch the current sound input and output [...] with just two clicks". I normally switch from microphone+speakers to headphones+headphones_microphone, so "2 clicks" to take a skype call is sometimes too much: "1 click" is much less! :-)
What I propose in this fork is that the indicator-sound-switcher auto-selects the corresponding/related sink or source when you click any source or sink. I am leaving this behavior as default, though I also added a menu item to disable this functionality.
Under the hood, it uses the long sink/source name to identify which sinks and sources are from the same "device" (informally speaking), for example from my Plantronics headset:
Here, "usb-Plantronics_Wireless_Audio_Plantronics_Wireless_Audio-00-Audio" is the middle part of both the input and output, and shows they come from the same (informally speaking) "device". The new menu looks like:
![menu_746](https://cloud.githubusercontent.com/assets/4777191/6611301/6d55467c-c849-11e4-8b74-26cd5f8bd69d.png)
which is exactly the state when I click either of the Plantronics options -- the other one is selected automatically.
The code modifications are not much. Functionality does not change too much either; so it is easy to test the code. Looking forward to seeing it bundled in the a new .deb in your PPA!