Add dmenu bluetooth menu

This commit is contained in:
2021-12-31 16:04:23 +01:00
parent 0c0a7e6672
commit 749fd7b3ac
2 changed files with 21 additions and 0 deletions

11
.bin/toggle-bt-device Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
status="$(bluetoothctl info "$1" | grep Connected | cut -f 2 -d ':' | cut -f 2 -d ' ')"
if [ "$status" == "no" ]
then
bluetoothctl connect "$1"
elif [ "$status" == "yes" ]
then
bluetoothctl disconnect "$1"
fi