fixed parameters given to __write_config_personal from create_new_config

This commit is contained in:
shockrahwow 2019-08-30 16:30:58 -07:00
parent 331633d41e
commit 51e16193fb

7
wifi
View File

@ -4,6 +4,7 @@
cfg_loc="/home/shockrah/.config/wifi-configs/"
iface="wlp1s0"
debug_kill=
# wpa_supplicant and dhclient are only exposed to root by default
if [ "`id -u`" -ne 0 ]
@ -11,8 +12,6 @@ then
echo 'Must be ran as root'
exit 1
fi
# Only activating this for testing the menu tbh
debug_kill=
__write_config_personal() {
printf "network={
@ -83,7 +82,7 @@ create_new_config() {
*Personal)
ssid="`echo '' | dmenu -p 'SSID'`"
psk="`echo '' | dmenu -p 'Passkey'`"
__write_config_personal "$cfg_loc/$name" "$ssid" "$psk"
__write_config_personal "$name" "$ssid" "$psk"
;;
*Enterprise)
ssid="`echo '' | dmenu -p 'SSID'`"
@ -95,7 +94,7 @@ create_new_config() {
}
option=`printf "Remove\nConnect\nNew\nDiconnect\n" | dmenu -i`
option=`printf "Remove\nConnect\nNew\nDiconnect\n" | dmenu -i -p 'Options:'`
case $option in
New) create_new_config;;
Remove) remove_old_config;;