This is a workaround for a system with pipewire as the primary audio server, which has been tested on Archlinux and Pico 4 as a headset.
What it does:
- Creates a virtual sink named
MySink, that you can choose as the default in your GUI - Checks in a loop every second to see if
alsa_capture.vrserverheadset speakers are available - Disconnects everything from this server (
alsa_capture.vrserver). I don't know why, but a microphone was connected to it. - Connects
MySinktoalsa_capture.vrserver
The script:
#!/bin/bash