aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-08-19 09:56:41 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-08-19 09:56:41 -0600
commit6bacfc0e22a0a3e5917f75b5af6d1a33b575356a (patch)
treec5279653f2538d7d9fe30a63a5775c432e29c601
parentb67dbf6462187a9a8346a8d312b46b33e8d74fa3 (diff)
downloadrde-6bacfc0e22a0a3e5917f75b5af6d1a33b575356a.tar.gz
rde-6bacfc0e22a0a3e5917f75b5af6d1a33b575356a.tar.bz2
rde-6bacfc0e22a0a3e5917f75b5af6d1a33b575356a.zip
Fix problem with bluetooth-select where the power options were not working
-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"