Simple script to change PipeWire output between two sinks
- WirePlumber
- notify-send.sh (for desktop notifications)
- grep
Just clone repository and move switcher.sh
into your scripts directory
Installation example:
git clone https://github.com/onezerodan/PipeWire-switch-output.git
cd PipeWire-switch-output
sudo mv switcher.sh /usr/bin
All you need - just specify devices
-
Run in terminal
wpctl status | grep -A3 -m 1 Sinks | tail -n 3
You will get someting like this:
│ * 45. HyperX Cloud Alpha S Analog Stereo [vol: 0.74] │ 47. GK104 HDMI Audio Controller Digital Stereo (HDMI 3) [vol: 0.74] │ 48. Starship/Matisse HD Audio Controller Digital Stereo (IEC958) [vol: 0.74]
I will choose HypeX as headphones and HDMI as another device
-
Put choosen device names into script
headphonesName=HyperX anotherDevice=HDMI
-
Edit notifications if you want
-
Enjoy!