This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wl(){ | |
| local ssid | |
| local conn | |
| nmcli device wifi rescan > /dev/null | |
| ssid=$(nmcli device wifi list | tail -n +2 | grep -v '^ *\B--\B' | fzf -m | sed 's/^ *\*//' | awk '{print $1}') | |
| if [ "x$ssid" != "x" ]; then | |
| # check if the SSID has already a connection setup | |
| conn=$(nmcli con | grep "$ssid" | awk '{print $1}' | uniq) |