added script to connect and disconnect headset

This commit is contained in:
twoneis 2025-03-19 11:20:05 +01:00
parent 6d005a373a
commit c2a5b6b617
3 changed files with 60 additions and 51 deletions

11
modules/niri/connect-headset.sh Executable file
View file

@ -0,0 +1,11 @@
#!/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