remove buttons, move notification to other script
[dotfiles_afify.git] / .scripts / bluetooth_connect_manual.sh
blob34b65672347ddcbe8965d13d3bdbb7c06dd52042
1 #!/usr/bin/env bash
3 status=$(bluetoothctl info FC:A8:9A:57:A4:8A | grep "Connected" | awk '{print $2}')
4 #echo $status
6 if [ "$status" = "yes" ]
7 then
8 exit
9 else
10 #sudo rfkill unblock bluetooth
11 bluetoothctl power off
12 #bluetoothctl power on
13 #sudo systemctl restart bluetooth
14 #sudo systemctl enable bluetooth
15 #sudo systemctl start bluetooth
17 bluetoothctl power on
18 bluetoothctl remove FC:A8:9A:57:A4:8A
19 timeout 7s bluetoothctl scan on
20 bluetoothctl pair FC:A8:9A:57:A4:8A
21 bluetoothctl trust FC:A8:9A:57:A4:8A
22 bluetoothctl connect FC:A8:9A:57:A4:8A
23 bluetoothctl exit