mirror of
https://github.com/LukeHagar/omarchy.git
synced 2025-12-06 12:37:46 +00:00
Fix for '(null)' display on AirPod source selection
This commit is contained in:
committed by
Ryan Hughes
parent
a42ba3dcbf
commit
04fa3fd32e
@@ -23,7 +23,13 @@ fi
|
|||||||
|
|
||||||
next_sink=$(echo "$sinks" | jq -r ".[$next_sink_index]")
|
next_sink=$(echo "$sinks" | jq -r ".[$next_sink_index]")
|
||||||
next_sink_name=$(echo "$next_sink" | jq -r '.name')
|
next_sink_name=$(echo "$next_sink" | jq -r '.name')
|
||||||
|
|
||||||
next_sink_description=$(echo "$next_sink" | jq -r '.description')
|
next_sink_description=$(echo "$next_sink" | jq -r '.description')
|
||||||
|
if [ "$next_sink_description" = "(null)" ] || [ "$next_sink_description" = "null" ] || [ -z "$next_sink_description" ]; then
|
||||||
|
sink_id=$(echo "$next_sink" | jq -r '.properties."object.id"')
|
||||||
|
next_sink_description=$(wpctl status | grep -E "\s+\*?\s+${sink_id}\." | sed -E 's/^.*[0-9]+\.\s+//' | sed -E 's/\s+\[.*$//')
|
||||||
|
fi
|
||||||
|
|
||||||
next_sink_volume=$(echo "$next_sink" | jq -r \
|
next_sink_volume=$(echo "$next_sink" | jq -r \
|
||||||
'.volume | to_entries[0].value.value_percent | sub("%"; "")')
|
'.volume | to_entries[0].value.value_percent | sub("%"; "")')
|
||||||
next_sink_is_muted=$(echo "$next_sink" | jq -r '.mute')
|
next_sink_is_muted=$(echo "$next_sink" | jq -r '.mute')
|
||||||
|
|||||||
Reference in New Issue
Block a user