scripts/blue
joachimschmidt557 fa79e786c8 show name
2019-12-17 23:17:12 +01:00

28 lines
370 B
Bash
Executable file

#!/bin/sh
PAIRED=$(bluetoothctl paired-devices | cut -d' ' -f2-)
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
;;
*)
echo "$OPTION" | cut -d' ' -f1 | xargs bluetoothctl connect
;;
esac