A Gnome Shell extension that allows you to hide selected output/input devices from the Quick Settings audio devices panel. Thanks to it, your Quick Settings panel will list only those devices that you actually use making it easier to quickly switch between them. Check out the https://extensions.gnome.org/extension/6000/quick-settings-audio-devices-renamer/ if you'd rather want to rename some device than hide it.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
Version | Status |
---|---|
15 | Active |
14 | Active |
13 | Active |
12 | Active |
11 | Rejected |
10 | Active |
9 | Active |
8 | Active |
7 | Active |
6 | Active |
5 | Rejected |
4 | Active |
3 | Active |
2 | Rejected |
1 | Rejected |
1. Please null out `SettingsUtils.settings` in disable. 2. Timeouts should be removed on disable (line 6 extension.js).
Any ideas how to approach #2? I use setTimeout in the `delay` function. I call that function in a few places throughout the code. Returning sourceId back to the Extension class through all the layers would be quite cumbersome, especially since delay will be called indefinite amount of times. Should I have some global collection for sourceIds and do something like: // modified delay function export function delay(milliseconds: number) { return new Promise((resolve) => { const sourceId = setTimeout(() => resolve(undefined), milliseconds); SOME_GLOBAL_COLLECTION.push(sourceId); }); } // modified extension's disable function disable() { SOME_GLOBAL_COLLECTION.forEach(id => { GLib.Source.remove(id); }); // other stuff... } SOME_GLOBAL_COLLECTION would be ever growing. It'd be a weird approach. All my delays are 200 ms, does it really matter to remove these sources in this case?
Yes, you should remove that since timeouts can get delayed and triggered after disable. so it will be a security issue. Holding all the timeout ids and removing all of them in disable is actually a good approach that some extensions doing it. Don't forget to clean up `SOME_GLOBAL_COLLECTION` in disable too. Also remove the timeout id once the callback is done to avoid getting warning in removing source id. For example: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/356bab112154743e69ad3fcbcd9029dc532b262e/js/ui/altTab.js#L821
Thanks, makes sense, I submitted version 3.