diff options
-rwxr-xr-x | .config/wmii-hg/rbar_wifi | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi index 3f222bd..445c10a 100755 --- a/.config/wmii-hg/rbar_wifi +++ b/.config/wmii-hg/rbar_wifi @@ -14,13 +14,14 @@ update() { id=$1 setup_trap "$id" while true; do - { - printf 'label ' - { - iwinfo wlp2s0 | sed -rn 's@^(ESSID|Link Quality)=@@p' - ifdata -pa wlp2s0 - } | sed 'N;N;s/\n/|/g' - } | write "$id" + printf 'label ' + IFS=$'\n' + lines=($( + iwinfo wlp2s0 | sed -rn 's@^(ESSID|Link Quality)=@@p' + ifdata -pa wlp2s0 + )) + IFS='|' + echo "label ${lines[*]}" | write "$id" sleep 1 done } |