From 7859c22571e978d343ea33435c3d9e10a1c73fd5 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 27 May 2021 11:16:46 +0300 Subject: [PATCH] sway/status.py: Fix iwctl for SSIDs with spaces We need to consider that some SSIDs will have spaces. --- sway/status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/status.py b/sway/status.py index 7bac9c0..d0e3fc1 100755 --- a/sway/status.py +++ b/sway/status.py @@ -21,7 +21,7 @@ def refresh(): try: ssid = ( check_output( - "iwctl station wlan0 show | grep 'Connected network' | awk '{print $3}'", + "iwctl station wlan0 show | grep -o 'Connected network.*$' | sed 's/^Connected network\s\+//'", shell=True, ) .strip()