A keyboard shortcut (default Super + Alt + O) opens a centered switcher in
the middle of the screen — just like the Super+Space keyboard-layout switcher.
While the shortcut's modifier keys (Super+Alt) are held, pressing the shortcut
again (or the arrow keys) cycles through the devices; releasing the keys
applies the selected audio output device. There is no panel icon.
For GNOME Shell 42 / 43 / 44 (including Ubuntu 22.04).
The switcher, opened with the shortcut:
Preferences (change the shortcut):
Super + Alt + O→ the switcher opens with the next device pre-selected.- Release the keys immediately → switch to that device (fast toggle between two).
- Keep the modifiers held and tap the shortcut again / use arrow keys → cycle.
- Esc → cancel without changing anything. Clicking outside also dismisses it.
It uses the same SwitcherPopup mechanism as Alt+Tab / Super+Space. It does
not create a custom full-screen modal. Esc cancels, releasing the modifier
selects, and if the input grab cannot be acquired it returns safely — it cannot
lock up the screen.
The device list matches the GNOME Sound settings exactly: the available
output devices (Gvc.MixerUIDevice) tracked via output-added / output-removed.
Unavailable ports (e.g. an HDMI/DP output with nothing plugged in) are hidden.
The UI is translatable via gettext. Bundled translations: English (source),
Turkish (tr). To add a language, translate po/audio-output-switcher.pot
into po/<lang>.po and compile it to
locale/<lang>/LC_MESSAGES/audio-output-switcher.mo.
cd /PATH/TO/audio-output-switcher
chmod +x install.sh uninstall.sh
sh install.sh # or ./install.shinstall.sh validates the JS syntax, JSON and schema first, and only then
copies the files.
A running GNOME Shell does not automatically reload updated JS into memory.
gnome-extensions disable/enable does not re-import the module either — it
only re-runs enable(). To load code changes:
- X11 / Xorg:
Alt + F2→r→Enter(windows are preserved). - Wayland: log out and back in.
Session type: echo $XDG_SESSION_TYPE
On X11, if the shell ever freezes:
Ctrl + Alt + F3(switch to a TTY)killall -3 gnome-shell(the shell restarts, your session is preserved)Ctrl + Alt + F2(back to the desktop)
gnome-extensions prefs audio-output-switcher@mehmetnuri.github.ioClick the button and press a new combination. Esc cancels, Backspace removes.
sh uninstall.shWithout touching your main session, test in a nested shell:
dbus-run-session -- gnome-shell --nested --waylandjournalctl -f -o cat /usr/bin/gnome-shell- UI:
SwitcherPopup(same class as Alt+Tab / Super+Space) — cannot lock up. - Device switching:
Gvc.MixerControl.change_output(uiDevice)(the Settings method). No external tool (pactl) or subprocess — pure native Gvc API. - Not for GNOME 45+ (which requires ES modules).

