Simple KDE/Plasma widget (plasmoid) to change the default audio output device (sink) or the default audio input device (source).
Tested on KDE/Plasma 5.27 and PipeWire 1.0.0. Since it uses the PulseAudio API, it should also work under PulseAudio. (Well, a lot of the work is done by KDE's own plasma-pa, as this widget here reuses the PulseAudio integration implemented there.)
- Clone this repository.
- Create the necessary directory, if needed:
mkdir -p ~/.local/share/plasma/plasmoids
- Link this repository over there:
ln -s path-to-this/repo/package ~/.local/share/plasma/plasmoids/clone.plasma-audio-device-switcher
- Using a distinct name to install the dev version alongside the stable version.
- Test it on a stand-alone window:
plasmawindowed clone.plasma-audio-device-switcher
plasmoidviewer -a clone.plasma-audio-device-switcher
plasmoidviewer -a ./package
These steps are inspired by the Plasma Widget Tutorial.
There are several ways, just pick one:
plasmapkg2 -i package
will install it on~/.local/share/plasma/plasmoids/
.plasmapkg2 -g -i package
will install it system-wide.plasmapkg2 -u package
to upgrade it.- You can also install it manually
cp -a package ~/.local/share/plasma/plasmoids/org.kde.plasma.audiodeviceswitcher-ng/
. - Or you can unzip the release zipfile onto that directory.
Originally created by akrutzler and published as https://store.kde.org/p/1195707/.
More than one year after the last commit on that original repository, lolcabanon's fork merged many pull requests, such as #13, #15, #17, plus adding a few extra features.
Almost one year later denilsonsa's fork merged one other pull request, and implemented further improvements.
With thanks to davidosomething, emvaized, Phen-Ro, plachste, xpt3.
I myself won't be able to keep maintaining this code. I'm not sure if I understand it well enough. This project has passed over many hands, and if you are willing to, feel free to adopt it!
- Volume control
- Using the scroll wheel over each button could change the volume level of that device.
- Middle-clicking could mute that device.
- Muted devices could have a different background color or different effect. (For the icons-only view; because the "(muted)" text is already shown.)
- We could have a background bar representing the volume level of each device.
- Other features
- Somehow be able to switch audio profiles. I have no idea how to make it useful while keeping the interface simple.
- Add Open Audio Volume Settings to the context menu
- Visual features
- Let the background to be transparent, as well as disabling the background.
- The vertical layout should be the default (due to very long device names). Or the icons-only horizontal layout.
- Custom image at the "Add widget" interface.