bash/for_smol/bt.sh

15 lines
228 B
Bash

#!/bin/bash
power=$(bluetoothctl show | grep Powered)
echo "$power"
if [[ "$power" = " Powered: no" ]]
then
bluetoothctl power on
sleep 1
bluetoothctl connect 68:D6:ED:28:EB:D9
exit
else
bluetoothctl power off
exit
fi