From 258acd15d165c5fc4ccedeaa890b04bd421e887c Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 19 Aug 2022 09:56:41 -0600 Subject: Fix problem with bluetooth-select where the power options were not working --- extras/HOME/.local/bin/bluetooth-select.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extras/HOME/.local/bin/bluetooth-select.sh b/extras/HOME/.local/bin/bluetooth-select.sh index 3a25387..4bc416b 100755 --- a/extras/HOME/.local/bin/bluetooth-select.sh +++ b/extras/HOME/.local/bin/bluetooth-select.sh @@ -6,14 +6,21 @@ fi devices="$(bluetoothctl -- devices | sed 's#^Device ##')" selection="$( - echo -e "$devices\nDisconnect" | $ROFI -i -p "Connect Bluetooth" \ + echo -e "$devices\nDisconnect\nPower On\nPower Off" | $ROFI -i -p "Connect Bluetooth" \ -theme-str '* {theme-color: #8888ff;}' \ -dmenu)" macaddr="${selection%% *}" if [[ "$macaddr" == "Disconnect" ]] ; then + echo "Disconnecting" exec bluetoothctl -- disconnect +elif [[ "$selection" == "Power On" ]] ; then + echo "Turning Power On" + exec bluetoothctl -- power on +elif [[ "$selection" == "Power Off" ]] ; then + echo "Turning Power Off" + exec bluetoothctl -- power off fi exec bluetoothctl -- connect "$macaddr" -- cgit