Skip Bluetooth startup delay when already powered

This commit is contained in:
Martin Bastien
2026-07-29 09:10:21 -04:00
parent 38c1352f6d
commit 79a75d7159
+1
View File
@@ -19,6 +19,7 @@ address=${2:-}
[[ $address =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]] || usage
power_on() {
bluetoothctl show | grep -Fq "Powered: yes" && return
bluetoothctl power on >/dev/null 2>&1 || true
sleep 0.5
}