You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
else
if [[ "$OPS" =~ "WPA2" ]] || [[ "$OPS" =~ "WEP" ]]; then
WIFIPASS=$(echo -en "" | rofi -dmenu -password -p "PASSWORD" \
-mesg "Enter the PASSWORD of the network" -lines 0 -font "$FONT")
fi
if [ -z "$WIFIPASS" ]; then
nmcli dev wifi con "$CHSSID"
fi
if [[ "$CHSSID" != '' ]] && [[ "$WIFIPASS" != '' ]]; then
nmcli dev wifi con "$CHSSID" password "$WIFIPASS"
fi
fi
This else is the last from the main function btw.
Since the user knows which connection it's already saved, the password won't be entered.
Another way to do this could be with the 'nmcli connection show' command, if the user doesn't want to remember which connections he has saved, which makes more sense in my mind.
if [ -n $( nmcli connection show | grep "$CHSSID" ) ]; then
nmcli dev wifi con "$CHSSID"
fi
jonnieey
added a commit
to jonnieey/nmcli-rofi
that referenced
this issue
Sep 20, 2020
For every known connections, the script still asks for the password.
I believe that this can be achieved with command "nmcli connection show"
Just an idea here.
The text was updated successfully, but these errors were encountered: