summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubham Saini <pryr@pryr.xyz>2022-10-03 03:12:35 +0000
committerShubham Saini <pryr@pryr.xyz>2022-10-03 03:12:35 +0000
commit13b4f196116f332b8e683c142327a956f3eb7f14 (patch)
treec5ef3f44ffc748390eb6ccd004e7bc2729db52ae
parent6f292e13a6b6c799f886bb9fadcdbfdeec44bd28 (diff)
polybar: fixing bluetooth script
-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