From ac3c161fb5fc0df791d0a1bd28eb522e6540191f Mon Sep 17 00:00:00 2001 From: Shawn Yeager Date: Wed, 14 Jan 2026 10:37:57 -0600 Subject: [PATCH 1/2] Fix Bluetooth device showing bluez ID instead of friendly name For Bluetooth audio devices, the friendly name (e.g., "Shawn's AirPods Max") is stored on the Device entry in wpctl, not the Sink entry. The previous fix looked up object.id (the sink), which shows the raw bluez ID like "bluez_output.90:9C:4A:EE:01:1C". This fix looks up device.id first to get the friendly name from the Device entry, falling back to object.id for non-Bluetooth devices. Co-Authored-By: Claude Opus 4.5 --- bin/omarchy-cmd-audio-switch | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-cmd-audio-switch b/bin/omarchy-cmd-audio-switch index 299eeb19..8e1b7d60 100755 --- a/bin/omarchy-cmd-audio-switch +++ b/bin/omarchy-cmd-audio-switch @@ -28,8 +28,16 @@ next_sink_name=$(echo "$next_sink" | jq -r '.name') 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+\[.*$//') + # For Bluetooth devices, the friendly name is on the Device entry (device.id), not the Sink entry (object.id) + device_id=$(echo "$next_sink" | jq -r '.properties."device.id"') + if [ "$device_id" != "null" ] && [ -n "$device_id" ]; then + next_sink_description=$(wpctl status | grep -E "^\s*│?\s+${device_id}\." | sed -E 's/^.*[0-9]+\.\s+//' | sed -E 's/\s+\[.*$//') + fi + # Fall back to object.id lookup if device.id didn't yield a result + if [ -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 fi next_sink_volume=$(echo "$next_sink" | jq -r \ From 7c0adf7d40206bd1b49305a2f470c0be300f99c2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 21 Feb 2026 07:43:14 +0100 Subject: [PATCH 2/2] Revert "Merge pull request #4260 from shawnyeager/fix-bluetooth-device-name-display" This reverts commit 517bc8920fb4732424eaef17e5ce0041548969d4, reversing changes made to cd01b3cedf9b7b18bc06c144be9c5e5f29478b17. --- bin/omarchy-cmd-audio-switch | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/bin/omarchy-cmd-audio-switch b/bin/omarchy-cmd-audio-switch index 8e1b7d60..299eeb19 100755 --- a/bin/omarchy-cmd-audio-switch +++ b/bin/omarchy-cmd-audio-switch @@ -28,16 +28,8 @@ next_sink_name=$(echo "$next_sink" | jq -r '.name') next_sink_description=$(echo "$next_sink" | jq -r '.description') if [ "$next_sink_description" = "(null)" ] || [ "$next_sink_description" = "null" ] || [ -z "$next_sink_description" ]; then - # For Bluetooth devices, the friendly name is on the Device entry (device.id), not the Sink entry (object.id) - device_id=$(echo "$next_sink" | jq -r '.properties."device.id"') - if [ "$device_id" != "null" ] && [ -n "$device_id" ]; then - next_sink_description=$(wpctl status | grep -E "^\s*│?\s+${device_id}\." | sed -E 's/^.*[0-9]+\.\s+//' | sed -E 's/\s+\[.*$//') - fi - # Fall back to object.id lookup if device.id didn't yield a result - if [ -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 + 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 \