sway/status.py: Fix iwctl for SSIDs with spaces

We need to consider that some SSIDs will have spaces.
This commit is contained in:
Alan Orth 2021-05-27 11:16:46 +03:00
parent 7b6d96c1c4
commit 7859c22571
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -21,7 +21,7 @@ def refresh():
try: try:
ssid = ( ssid = (
check_output( 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, shell=True,
) )
.strip() .strip()