From 3d3ed97a332194f2a8030d5cc82aadd358e03031 Mon Sep 17 00:00:00 2001 From: William Ball Date: Sat, 11 Oct 2025 17:46:05 -0400 Subject: [PATCH] bluetooth scripts --- niri/.config/niri/bluetooth.sh | 11 +++++++++++ niri/.config/niri/config.kdl | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100755 niri/.config/niri/bluetooth.sh diff --git a/niri/.config/niri/bluetooth.sh b/niri/.config/niri/bluetooth.sh new file mode 100755 index 0000000..5db68e1 --- /dev/null +++ b/niri/.config/niri/bluetooth.sh @@ -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 diff --git a/niri/.config/niri/config.kdl b/niri/.config/niri/config.kdl index 4c1f7d9..22f5cb2 100644 --- a/niri/.config/niri/config.kdl +++ b/niri/.config/niri/config.kdl @@ -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"; }