Fix bt-menu
This commit is contained in:
parent
867f717c5f
commit
74c82adf73
@ -9,12 +9,12 @@ bt_choice=""
|
|||||||
function get-bt-devices() {
|
function get-bt-devices() {
|
||||||
DEVICES=()
|
DEVICES=()
|
||||||
IFS="\n"
|
IFS="\n"
|
||||||
for device in $(bluetoothctl devices); do
|
while read -r device; do
|
||||||
IFS=' '
|
address=${device:7:17}
|
||||||
read -r ignore address name <<<"$(echo $device)"
|
name=${device:25}
|
||||||
echo "$name - $address"
|
echo "$name - $address"
|
||||||
DEVICES+=(["$name"]="$address")
|
DEVICES+=(["$name"]="$address")
|
||||||
done
|
done <<< "$(bluetoothctl devices)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function bt-device-choice() {
|
function bt-device-choice() {
|
||||||
|
Loading…
Reference in New Issue
Block a user