aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xextras/HOME/.local/bin/bluetooth-select.sh9
1 files changed, 8 insertions, 1 deletions
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"