28 lines
345 B
Bash
Executable file
28 lines
345 B
Bash
Executable file
#!/bin/sh
|
|
|
|
PAIRED=$(bluetoothctl paired-devices | awk '{ print $2 }')
|
|
|
|
OPTION=$(echo "$RECENT" | cat <<EOF | dmenu)
|
|
On
|
|
Off
|
|
Disconnect
|
|
$PAIRED
|
|
EOF
|
|
|
|
case "$OPTION" in
|
|
On)
|
|
bluetoothctl power on
|
|
;;
|
|
Off)
|
|
bluetoothctl power off
|
|
;;
|
|
Disconnect)
|
|
bluetoothctl disconnect
|
|
;;
|
|
"")
|
|
exit 1
|
|
;;
|
|
*)
|
|
bluetoothctl connect "$OPTION"
|
|
;;
|
|
esac
|