iXab3r / MicSwitch

MicSwitch is a tool which allows you to mute/unmute your microphone using a predefined hotkey
314 stars 28 forks source link

Changing the icon when the system automatically turns on/off the microphone #61

Open BlasterAlex opened 3 years ago

BlasterAlex commented 3 years ago

When the microphone is turned off and the Bluetooth headset is plugged in, the system turns the microphone on and the icon changes from off to on correctly.

When the headphones are disconnected, the system restores the previous state of the microphone and turns it off, but the icon on the panel doesn't change. In this case, the microphone is in the off state and if you click on the icon, the microphone will turn on and the icon will change from on to on :). If you press again, the icon changes to off, and the microphone are off again.

Thus, it is necessary to add some background tracking of the microphone status and change the icon, or monitor the headset on/off events, if it is functionally possible.

iXab3r commented 2 years ago

Agreed, currently the code subscribes to system events, but it seems that they are not triggered in this case