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
2026-07-29 10:41:54 -07:00
committed by GitHub
2 changed files with 43 additions and 0 deletions
+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
}