From eccb7686e8e059eb46c18c949f2a75f3f41be3b9 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 23 Aug 2024 16:09:49 +0100 Subject: [PATCH] [wifi_dmenu.sh]: Display error messages in the notification when connection fails Redirect stderr to stdout so that it appears in the notification --- wifi_dmenu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wifi_dmenu.sh b/wifi_dmenu.sh index fa25cc7..dec11e6 100755 --- a/wifi_dmenu.sh +++ b/wifi_dmenu.sh @@ -5,4 +5,4 @@ script_name="$(basename "$0")" notify-send "$script_name" "Scanning for available networks..." # cutting the first 9 characters of the nmcli output as it will contain empty fields which will mess up awk parsing -notify-send "$script_name" "$(nmcli connection up $( nmcli device wifi list | cut --characters=9- | awk '(NR > 1){ print $2}' | sort | uniq | dmenu -p "Connect to network: "))" +notify-send "$script_name" "$( nmcli connection up $( nmcli device wifi list | cut --characters=9- | awk '(NR > 1){ print $2}' | sort | uniq | dmenu -p "Connect to network: ") 2>&1 )"