yktoo / indicator-sound-switcher

Sound input/output selector indicator for Linux
https://yktoo.com/en/software/sound-switcher-indicator/
GNU General Public License v3.0
365 stars 28 forks source link

Hidden shortcut causes app to crash #118

Closed token47 closed 2 years ago

token47 commented 2 years ago

I migrated my configuration to a new laptop and Indicator Sound Switcher detected new hardware. So far so good, the problem is that it hid the old one, and together with it a shortcut definition that I could not remove anymore.

I tried to add the same shortcut again to the new device and, although it worked in ISS, every time I pressed the key, gnome opened a dialog of a system problem to report. When I manually edited the JSON config file and removed the old hardware definition then the problem stopped.

Seems like it would be interesting to keep the old hardware around (show them in the list but grayed out, maybe?) so you can still do minimal editing on them (like remove the shortcuts or at least remove it completely). Also, there could be a warning that you are using the same shortcut already used in other device.

Thank you for the awesome application.

yktoo commented 2 years ago

Thanks for reporting the issue. I guess the app must simply ignore shortcuts on non-existent devices since it's a valid situation (the device can be currently offline, e.g. a Bluetooth headphone).

there could be a warning that you are using the same shortcut already used in other device

The ability to reuse a shortcut is officially a feature (#106): you can assign one shortcut to multiple ports to switch among them in order with each stroke.

The current workaround for the error is indeed to manually edit ~/.config/indicator-sound-switcher.json and remove the erroneous entries.

token47 commented 2 years ago

Hi Dmitry

Thank you for the response. Ok, I understand the utility of having the shortcut still added to offline devices, it may indeed be useful. On a second though, that is interesting,

But, just to clarify my points above a little more, I still think these poitns are still worth evaluating:

1) My system was crashing. I was getting an ubuntu dialog saying something crashed and a report should be sent. That happened every time I pressed the shortcut. It stopped happening when I removed the shortcut from the other offline profile. I can't tell you exactly why, but it helped.

2) This is more a suggestion that an issue: having the offline devices still appear on the list (even if grayed out) would be really interesting, for you to be able to just delete them or even edit some aspects like the shortkey as mentioned above (I had to edit the JSON file to achieve that).

Anyway, those are not real issues (at least not anymore) so you may close this one or keep it open for the suggestion if you want.

Thank you!

yktoo commented 2 years ago

@token47 The point (1) is addressed, the point (2) is filed as #120 (albeit in a simplified form).

yktoo commented 2 years ago

Released in 2.3.8.