diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2022-08-19 09:56:41 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:46 -0600 |
| commit | 258acd15d165c5fc4ccedeaa890b04bd421e887c (patch) | |
| tree | c5279653f2538d7d9fe30a63a5775c432e29c601 /extras | |
| parent | 4fd7572c12c9cdc2e034fd9cbaf1423d40153081 (diff) | |
| download | rde-258acd15d165c5fc4ccedeaa890b04bd421e887c.tar.gz rde-258acd15d165c5fc4ccedeaa890b04bd421e887c.tar.bz2 rde-258acd15d165c5fc4ccedeaa890b04bd421e887c.zip | |
Fix problem with bluetooth-select where the power options were not working
Diffstat (limited to 'extras')
| -rwxr-xr-x | extras/HOME/.local/bin/bluetooth-select.sh | 9 |
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" |