fix(eww -> get-connectivity-info): Fixed wireless info parsing
When SSIDs contain spaces
This commit is contained in:
parent
63134d3675
commit
e679417a08
1 changed files with 3 additions and 2 deletions
|
@ -40,8 +40,9 @@ print_network_infos() {
|
||||||
"$(echo "$route_line" | awk '{ print $3 }')"
|
"$(echo "$route_line" | awk '{ print $3 }')"
|
||||||
|
|
||||||
if [ "$state" = wireless ]; then
|
if [ "$state" = wireless ]; then
|
||||||
ssid=$(nmcli connection show --active | grep "$device" | cut -d \ -f1)
|
wireless_info=$(nmcli --get-values active,ssid,signal dev wifi list --rescan no | grep "^yes")
|
||||||
signal=$(nmcli dev wifi list --rescan no | awk '/\*/{if (NR!=1) {print $8}}')
|
ssid=$(echo "$wireless_info" | cut -d : -f2)
|
||||||
|
signal=$(echo "$wireless_info" | cut -d : -f3)
|
||||||
printf ',"wifi":{"signal":"%s","ssid":"%s"}' \
|
printf ',"wifi":{"signal":"%s","ssid":"%s"}' \
|
||||||
"$(wifi_strength "$signal")" \
|
"$(wifi_strength "$signal")" \
|
||||||
"$ssid"
|
"$ssid"
|
||||||
|
|
Loading…
Reference in a new issue