commit 34d97a1bf51b745b5d8423f2963286cf2e559e59
parent 2d5ae7524ae9183b96e7286bb3a271412dc02679
Author: Matthew Carlson <matt@mcarlson.xyz>
Date: Fri, 12 Nov 2021 00:43:06 -0500
only prompt to forget if network name is not empty
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/iwd-dmenu b/iwd-dmenu
@@ -69,7 +69,7 @@ iwd_dmenu() {
network="$(show_menu 'Forget' "${network_names}")"
# get confirmation
- answer="$(show_menu "Forget ${network}?" 'Yes' 'No')"
+ [ -n "${network}" ] && answer="$(show_menu "Forget ${network}?" 'Yes' 'No')"
# forget if answer is yes
[ "${answer}" = 'Yes' ] && iwctl known-networks "${network}" forget
@@ -85,6 +85,8 @@ iwd_dmenu() {
# scan interface
iwctl station "${interface}" scan
+ printf '%s\n' "${1}"
+
info="$(eval "${1}" | grep '\s' | tail +3 | awk '{ $1 = $1 }; 1' | sed -e 's/\x1b\[[0-9;]*m//g')"
network_names="$(get_network_column '1')"