mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
update iw listing
This commit is contained in:
parent
c2c186262b
commit
b4912d62c1
1 changed files with 3 additions and 9 deletions
|
@ -36,14 +36,6 @@ _essid_scan() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
_essid_list() {
|
|
||||||
# only show lines with signal '*'
|
|
||||||
# kill spaces from the end and replace spaces with + between
|
|
||||||
# '+' character is one of 6 forbidden characters in SSID standard
|
|
||||||
_ESSID+="$(iwctl station "${_INTERFACE}" get-networks | rg -o ' {6}(.{34}).*\*' -r '"$1' | sd ' *\n$' '" _')"
|
|
||||||
echo ${_ESSID[@]}
|
|
||||||
}
|
|
||||||
|
|
||||||
_wireless() {
|
_wireless() {
|
||||||
_WLAN_HIDDEN=""
|
_WLAN_HIDDEN=""
|
||||||
_WLAN_SSID=""
|
_WLAN_SSID=""
|
||||||
|
@ -61,7 +53,9 @@ _wireless() {
|
||||||
_essid_scan | _dialog --title " Network Configuration " --no-mouse --gauge "Scanning 5 second(s) for SSIDs with interface ${_INTERFACE}..." 6 60
|
_essid_scan | _dialog --title " Network Configuration " --no-mouse --gauge "Scanning 5 second(s) for SSIDs with interface ${_INTERFACE}..." 6 60
|
||||||
#shellcheck disable=SC2086,SC2046
|
#shellcheck disable=SC2086,SC2046
|
||||||
if _dialog --cancel-label "${_LABEL}" --title " SSID Scan Result " --menu "Empty spaces in your SSID are replaced by '+' char" 13 60 6 \
|
if _dialog --cancel-label "${_LABEL}" --title " SSID Scan Result " --menu "Empty spaces in your SSID are replaced by '+' char" 13 60 6 \
|
||||||
"RESCAN" "SSIDs" "HIDDEN" "SSID" $(_essid_list _) 2>"${_ANSWER}"; then
|
"RESCAN" "SSIDs" "HIDDEN" "SSID" $(iwctl station "${_INTERFACE}" get-networks |\
|
||||||
|
rg -o ' {6}(.{34}).*\*' -r '$1' |\
|
||||||
|
sd ' ' '\+' | sd '\+*\n$' ' _') 2>"${_ANSWER}"; then
|
||||||
_WLAN_SSID=$(cat "${_ANSWER}")
|
_WLAN_SSID=$(cat "${_ANSWER}")
|
||||||
_CONTINUE=1
|
_CONTINUE=1
|
||||||
if rg -q 'RESCAN' "${_ANSWER}"; then
|
if rg -q 'RESCAN' "${_ANSWER}"; then
|
||||||
|
|
Loading…
Reference in a new issue