summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpolybar/.config/polybar/bt.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/polybar/.config/polybar/bt.sh b/polybar/.config/polybar/bt.sh
index 0500e67..177932b 100755
--- a/polybar/.config/polybar/bt.sh
+++ b/polybar/.config/polybar/bt.sh
@@ -5,7 +5,7 @@ bluetooth_print() {
5 if [ "$(systemctl is-active "bluetooth.service")" = "active" ]; then 5 if [ "$(systemctl is-active "bluetooth.service")" = "active" ]; then
6 # printf 'on' 6 # printf 'on'
7 7
8 devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2) 8 devices_paired=$(bluetoothctl devices | grep Device | cut -d ' ' -f 2)
9 counter=0 9 counter=0
10 10
11 for device in $devices_paired; do 11 for device in $devices_paired; do
@@ -40,12 +40,12 @@ bluetooth_toggle() {
40 bluetoothctl power on >> /dev/null 40 bluetoothctl power on >> /dev/null
41 sleep 1 41 sleep 1
42 42
43 devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2) 43 devices_paired=$(bluetoothctl devices | grep Device | cut -d ' ' -f 2)
44 echo "$devices_paired" | while read -r line; do 44 echo "$devices_paired" | while read -r line; do
45 bluetoothctl connect "$line" >> /dev/null 45 bluetoothctl connect "$line" >> /dev/null
46 done 46 done
47 else 47 else
48 devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2) 48 devices_paired=$(bluetoothctl devices | grep Device | cut -d ' ' -f 2)
49 echo "$devices_paired" | while read -r line; do 49 echo "$devices_paired" | while read -r line; do
50 bluetoothctl disconnect "$line" >> /dev/null 50 bluetoothctl disconnect "$line" >> /dev/null
51 done 51 done