Update .config/polybar/scripts/wifi-menu.sh
This commit is contained in:
parent
17464d3b42
commit
d37e12e84b
1 changed files with 5 additions and 6 deletions
|
@ -12,7 +12,7 @@ elif [[ "$connected" =~ "disabled" ]]; then
|
|||
fi
|
||||
|
||||
# Use rofi to select wifi network
|
||||
chosen_network=$(echo -e "$toggle\n$wifi_list" | uniq -u | rofi -dmenu -i -selected-row 1 -p "Wi-Fi SSID: " -theme ~/.config/polybar/mytheme/scripts/rofi/powermenu.rasi)
|
||||
chosen_network=$(echo -e "$toggle\n$wifi_list" | uniq -u | rofi -dmenu -i -selected-row 1 -p "Wi-Fi SSID: " -theme ~/.config/polybar/scripts/rofi/powermenu.rasi)
|
||||
# Get name of connection
|
||||
read -r chosen_id <<<"${chosen_network:3}"
|
||||
|
||||
|
@ -31,9 +31,8 @@ else
|
|||
nmcli connection up id "$chosen_id" | grep "successfully" && notify-send "Connection Established" "$success_message"
|
||||
else
|
||||
if [[ "$chosen_network" =~ "" ]]; then
|
||||
wifi_password=$(rofi -dmenu -p "Password: " -theme ~/.config/polybar/colorblocks/scripts/rofi/launcher.rasi)
|
||||
wifi_password=$(rofi -dmenu -p "Password: " -theme ~/.config/polybar/scripts/rofi/launcher.rasi)
|
||||
fi
|
||||
nmcli device wifi connect "$chosen_id" password "$wifi_password" | grep "successfully" && notify-send "Connection Established" "$success_message"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue