Use wpctl instead of pactl to switch default audio sink (#5236)

pactl set-default-sink only updates PipeWire's default.audio.sink
metadata, but WirePlumber immediately overrides it back because
default.configured.audio.sink remains unchanged. wpctl set-default
updates both, making the switch actually persist.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sergio Jr
2026-04-22 13:56:15 +02:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 1c65d1db0f
commit bde1537f6e
+2 -1
View File
@@ -53,7 +53,8 @@ fi
next_sink_volume_icon="sink-volume-${icon_state}-symbolic"
if [[ $next_sink_name != $current_sink_name ]]; then
pactl set-default-sink "$next_sink_name"
next_sink_wpid=$(echo "$next_sink" | jq -r '.properties."object.id"')
wpctl set-default "$next_sink_wpid"
fi
omarchy-swayosd-client \