benji / headphones

~/scripts/headphones Commits Diff Raw
#!/bin/fish

set headphones 74:45:CE:41:1A:DF
switch (bluetoothctl info $headphones | string collect)
  case '*Connected: no*'
    bluetoothctl connect $headphones
  case '*Connected: yes*'
    bluetoothctl disconnect $headphones
end