bluetooth scripts

This commit is contained in:
William Ball 2025-10-11 17:46:05 -04:00
parent efcfc51e48
commit 3d3ed97a33
No known key found for this signature in database
2 changed files with 13 additions and 2 deletions

11
niri/.config/niri/bluetooth.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
address="88:C9:E8:D7:60:85"
if [ $1 = "connect" ]; then
notify-send "Bluetooth" "Connecting to Headphones"
bluetoothctl connect $address
else
notify-send "Bluetooth" "Disconnecting Headphones"
bluetoothctl disconnect $address
fi

View file

@ -95,8 +95,8 @@ binds {
Mod+Semicolon hotkey-overlay-title="Run an Application: bemenu" { spawn "bemenu-run"; }
Mod+Ctrl+O hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
Mod+B { spawn "bluetoothctl" "connect" "88:C9:E8:D7:60:85"; }
Mod+Shift+B { spawn "bluetoothctl" "disconnect" "88:C9:E8:D7:60:85"; }
Mod+B { spawn "sh" "-c" "~/.config/niri/bluetooth.sh connect"; }
Mod+Shift+B { spawn "sh" "-c" "~/.config/niri/bluetooth.sh disconnect"; }
Mod+E { spawn "emacsclient" "--create-frame" "-a" "emacs"; }