Browse Source

updated wifi

fixme: alway prompts for password instead of reusing credentials
master
DanielFGray 3 months ago
parent
commit
7cf2925b01
1 changed files with 10 additions and 6 deletions
  1. 10
    6
      wifi

+ 10
- 6
wifi View File

@@ -25,9 +25,13 @@ die() {

has -v nmcli fzf || die

nmcli -d wifi rescan 2> /dev/null
network=$(nmcli --color yes device wifi | fzf --ansi --height=40% --reverse --cycle --inline-info --header-lines=1)
[[ -z "$network" ]] && exit
network=$(sed -r 's/^\s*\*?\s*//; s/\s*(Ad-Hoc|Infra).*//' <<< "$network")
echo "connecting to \"${network}\"..."
nmcli -a device wifi connect "$network"
nmcli -f 'bssid,signal,bars,freq,ssid' --color yes device wifi |
fzf \
--with-nth=2.. \
--ansi \
--height=40% \
--reverse \
--cycle \
--inline-info \
--header-lines=1 \
--bind="enter:execute:nmcli -a device wifi connect {1}"

Loading…
Cancel
Save