fix: put network interface section inside list
This commit is contained in:
parent
73c89e9caa
commit
d5ec68b709
1 changed files with 20 additions and 18 deletions
|
@ -482,25 +482,27 @@ def init_widget_list(main=True, laptop=False):
|
||||||
[
|
[
|
||||||
*sum(
|
*sum(
|
||||||
[
|
[
|
||||||
*(
|
[
|
||||||
[widget.Sep(linewidth=2, padding=3)]
|
*(
|
||||||
if i != 0
|
[widget.Sep(linewidth=2, padding=3)]
|
||||||
else []
|
if i != 0
|
||||||
),
|
else []
|
||||||
widget.TextBox(text=f"{interface}:", padding=2),
|
),
|
||||||
widget.Net(
|
widget.TextBox(text=f"{interface}:", padding=2),
|
||||||
interface=interface,
|
widget.Net(
|
||||||
format="{down} ↓↑ {up}",
|
interface=interface,
|
||||||
padding=5,
|
format="{down} ↓↑ {up}",
|
||||||
),
|
padding=5,
|
||||||
]
|
),
|
||||||
for i, interface in enumerate(
|
]
|
||||||
os.popen(
|
for i, interface in enumerate(
|
||||||
"ifconfig -s | grep -wv -e Iface -e lo | awk {'print $1'} | tac"
|
os.popen(
|
||||||
|
"ifconfig -s | grep -wv -e Iface -e lo | awk {'print $1'} | tac"
|
||||||
|
)
|
||||||
|
.read()
|
||||||
|
.splitlines()
|
||||||
)
|
)
|
||||||
.read()
|
]
|
||||||
.splitlines()
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue