diff --git a/kwm/.config/kwm/bluetooth.sh b/kwm/.config/kwm/bluetooth.sh new file mode 100755 index 0000000..90b49ed --- /dev/null +++ b/kwm/.config/kwm/bluetooth.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +case "$1" in + --connect) + notify-send 'bluetooth' 'Connecting to Headphones' + bluetoothctl connect "88:C9:E8:D7:60:85" + ;; + --disconnect) + notify-send 'bluetooth' 'Disconnecting Headphones' + bluetoothctl disconnect "88:C9:E8:D7:60:85" + ;; + *) + exit 1 + ;; +esac diff --git a/kwm/.config/kwm/config.zon b/kwm/.config/kwm/config.zon index ed3832d..1582526 100644 --- a/kwm/.config/kwm/config.zon +++ b/kwm/.config/kwm/config.zon @@ -468,7 +468,7 @@ .event = .{ .click = .{ .pressed = .{ - .spawn = .{ .argv = .{ "bluetoothctl", "connect", "88:C9:E8:D7:60:85" } }, + .spawn = .{ .argv = .{ "/home/wball/.config/kwm/bluetooth.sh", "--connect" } }, }, }, }, @@ -479,7 +479,7 @@ .event = .{ .click = .{ .pressed = .{ - .spawn = .{ .argv = .{ "bluetoothctl", "disconnect", "88:C9:E8:D7:60:85" } }, + .spawn = .{ .argv = .{ "/home/wball/.config/kwm/bluetooth.sh", "--disconnect" } }, }, }, }, diff --git a/kwm/.config/kwm/init.sh b/kwm/.config/kwm/init.sh index d3c85a6..77099a8 100755 --- a/kwm/.config/kwm/init.sh +++ b/kwm/.config/kwm/init.sh @@ -10,7 +10,7 @@ emacs --daemon & # swayidle pgrep swayidle || swayidle -w \ - timeout 300 '$HOME/.config/river/timeout.sh' \ + timeout 300 '$HOME/.config/kwm/timeout.sh' \ before-sleep 'swaylock -f -c 000000' & # gnome-keyring (needed for nextcloud to remember login)