feat(functions/bluetooth): number of attemts if connect errors
This commit is contained in:
parent
93f606cbed
commit
ce3d6a6ed4
@ -1,4 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
bssid="$(bluetoothctl devices | dmenu -p "Devices: " -l 20 | cut -d' ' -f2)"
|
bssid="$(bluetoothctl devices | dmenu -p "Devices: " -l 20 | cut -d' ' -f2)"
|
||||||
bluetoothctl connect "$bssid"
|
|
||||||
|
exit_counter=0
|
||||||
|
until bluetoothctl connect "$bssid"
|
||||||
|
do
|
||||||
|
((exit_counter+=1))
|
||||||
|
|
||||||
|
if [ "$exit_counter" -gt 3 ]; then
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo ...
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user