mirror of
https://github.com/FAUSheppy/config
synced 2025-12-09 16:18:33 +01:00
feat: bluetooth connection/diconnect hotkey
This commit is contained in:
17
herbstluftwm/bluethooth_connect.sh
Executable file
17
herbstluftwm/bluethooth_connect.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SESSION="btconnect"
|
||||
MAC="E8:9E:13:04:0A:77"
|
||||
|
||||
if [[ "$1" == "d" ]]; then
|
||||
CMD="disconnect $MAC"
|
||||
else
|
||||
CMD="connect $MAC"
|
||||
fi
|
||||
|
||||
tmux new-session -d -s "$SESSION" "bluetoothctl"
|
||||
|
||||
sleep 0.3
|
||||
|
||||
tmux send-keys -t "$SESSION" "$CMD" C-m
|
||||
tmux send-keys -t "$SESSION" C-d
|
||||
Reference in New Issue
Block a user