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
1 changed files with 1 additions and 1 deletions

View File

@ -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()