From c16766c8b1b578a9c0a35dd016b7f146baadbdba Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 14 Sep 2025 19:37:35 +0200 Subject: [PATCH] Deal with not-available sinks on audio switcher Closes #1603 Co-authored-by: @elpritchos --- bin/omarchy-cmd-audio-switch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/omarchy-cmd-audio-switch b/bin/omarchy-cmd-audio-switch index b49a83a5..63ce7a1e 100755 --- a/bin/omarchy-cmd-audio-switch +++ b/bin/omarchy-cmd-audio-switch @@ -2,7 +2,7 @@ focused_monitor="$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')" -sinks=$(pactl -f json list sinks | jq '[.[] | select([.ports[]? | .availability == "available"] | any)]') +sinks=$(pactl -f json list sinks | jq '[.[] | select((.ports | length == 0) or ([.ports[]? | .availability != "not available"] | any))]') sinks_count=$(echo "$sinks" | jq '. | length') if [ "$sinks_count" -eq 0 ]; then