nix-config/modules/niri/connect-headset.sh

11 lines
223 B
Bash
Executable file

#!/usr/bin/env fish
set -l mac "FC:C3:3A:00:04:C2"
set -l connected (bluetoothctl info $mac | grep "Connected:")
if string match -qr ".*yes" $connected
bluetoothctl disconnect $mac
else
bluetoothctl connect $mac
end