mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Update audio switch script to filter available sinks (#1555)
Filter audio sinks to include only available ports.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
focused_monitor="$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')"
|
focused_monitor="$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')"
|
||||||
|
|
||||||
sinks=$(pactl -f json list sinks)
|
sinks=$(pactl -f json list sinks | jq '[.[] | select([.ports[]? | .availability == "available"] | any)]')
|
||||||
sinks_count=$(echo "$sinks" | jq '. | length')
|
sinks_count=$(echo "$sinks" | jq '. | length')
|
||||||
|
|
||||||
if [ "$sinks_count" -eq 0 ]; then
|
if [ "$sinks_count" -eq 0 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user