Merge pull request #6428 from yuters/agent/speed-up-bluetooth-pairing

Skip Bluetooth startup delay when already powered
This commit is contained in:
David Heinemeier Hansson authored and GitHub committed 2026-07-29 10:41:54 -07:00
commit 6895136eed
2 files changed
+43

No files matched your search

+1
View File
@@ -19,6 +19,7 @@ address=${2:-}
[[ $address =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]] || usage
power_on() {
[[ $(timeout 2s bluetoothctl show 2>/dev/null) == *"Powered: yes"* ]] && return
bluetoothctl power on >/dev/null 2>&1 || true
sleep 0.5
}