Skip to content

This is a fork of akrutzler's widget, and a fork of denilsonsa's enhancements to it.

License

Notifications You must be signed in to change notification settings

Phen-Ro/plasma-audio-device-switcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audio Device Switcher NG

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.)

How to develop

  1. Clone this repository.
  2. Create the necessary directory, if needed: mkdir -p ~/.local/share/plasma/plasmoids
  3. 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.
  4. 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.

How to install

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.

Credits

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.

Future

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!

Ideas for new features

  • 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
  • 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.

About

This is a fork of akrutzler's widget, and a fork of denilsonsa's enhancements to it.

Resources

License

Stars

Watchers

Forks

Languages

  • QML 63.5%
  • Shell 36.5%