Add dmenu bluetooth menu
This commit is contained in:
11
.bin/toggle-bt-device
Executable file
11
.bin/toggle-bt-device
Executable 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
|
||||
Reference in New Issue
Block a user