added script to connect and disconnect headset
This commit is contained in:
parent
6d005a373a
commit
c2a5b6b617
3 changed files with 60 additions and 51 deletions
11
modules/niri/connect-headset.sh
Executable file
11
modules/niri/connect-headset.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue