Skip to content

Commit 949e9ec

Browse files
🩹 fix(bluetooth): Correct device listing.
1 parent f4c6a59 commit 949e9ec

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.bin/bluetooth.count

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env sh
22

3-
bluetoothctl info | grep -c 'Connected: yes'
3+
bluetooth.devices Connected | wc -l

.bin/bluetooth.devices

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env dash
2+
3+
bluetoothctl devices "$@" | grep '^Device '

.bin/bluetooth.menu.connect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
device="$(bluetoothctl devices Paired | fzf-menu --lines 5 --columns 60 --prompt ' connect' | cut -d' ' -f2)"
3+
device="$(bluetooth.devices Paired | fzf-menu --lines 5 --columns 60 --prompt ' connect' | cut -d' ' -f2)"
44

55
if [ -n "$device" ] ; then
66
bluetoothctl connect "$device"

.bin/bluetooth.menu.disconnect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
device="$(bluetoothctl info | grep -v '^\s' | fzf-menu --lines 5 --columns 60 --prompt ' disconnect' | cut -d' ' -f2)"
3+
device="$(bluetooth.devices Connected | fzf-menu --lines 5 --columns 60 --prompt ' disconnect' | cut -d' ' -f2)"
44

55
if [ -n "$device" ] ; then
66
bluetoothctl disconnect "$device"

0 commit comments

Comments
 (0)