#!/usr/bin/env bash
# Connect or disconnect the bluetooth device with MAC $1.
mac=$1
if bluetoothctl info "$mac" 2>/dev/null | grep -q "Connected: yes"; then
  bluetoothctl disconnect "$mac"
else
  bluetoothctl connect "$mac"
fi
