Networkwidget: Simplify newline append.
This commit is contained in:
parent
1a94f0e760
commit
3b61c30171
|
@ -26,25 +26,22 @@
|
|||
fi
|
||||
|
||||
for net in ''${_vpns[@]}; do
|
||||
[[ "''${networks}" = "" ]] || networks+="\\\n"
|
||||
networks+=" ''${net}"
|
||||
networks+=" ''${net}\\\n"
|
||||
done
|
||||
|
||||
for net in ''${_ethernets[@]}; do
|
||||
[[ "''${networks}" = "" ]] || networks+="\\\n"
|
||||
networks+=" ''${net}"
|
||||
networks+=" ''${net}\\\n"
|
||||
done
|
||||
|
||||
for net in ''${_wifis[@]}; do
|
||||
[[ "''${networks}" = "" ]] || networks+="\\\n"
|
||||
networks+=" ''${net}"
|
||||
networks+=" ''${net}\\\n"
|
||||
done
|
||||
|
||||
for bt in ''${_bts[@]}; do
|
||||
[[ "''${networks}" = "" ]] || networks+="\\\n"
|
||||
networks+=" ''${bt}"
|
||||
networks+=" ''${bt}\\\n"
|
||||
done
|
||||
|
||||
networks[-1]=''${networks[-1]%\\\n}
|
||||
printf "{\"text\": \"''${icon}\", \"tooltip\": \"''${networks[@]}\", \"class\": \"''${class}\"}\n"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue