scripts/blue
joachimschmidt557 04fb50ffc0 improve blue
2019-12-12 15:59:54 +01:00

28 lines
389 B
Bash
Executable file

#!/bin/sh
RECENT=$(fish -c "history | grep -v 'grep' | grep 'bluetoothctl connect' | awk '{print \$3;}' | uniq")
OPTION=$(echo "$RECENT" | cat <<EOF | dmenu)
On
Off
Disconnect
$RECENT
EOF
case "$OPTION" in
On)
bluetoothctl power on
;;
Off)
bluetoothctl power off
;;
Disconnect)
bluetoothctl disconnect
;;
"")
exit 1
;;
*)
bluetoothctl connect "$OPTION"
;;
esac