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(
|
||||
[
|
||||
*(
|
||||
[widget.Sep(linewidth=2, padding=3)]
|
||||
if i != 0
|
||||
else []
|
||||
),
|
||||
widget.TextBox(text=f"{interface}:", padding=2),
|
||||
widget.Net(
|
||||
interface=interface,
|
||||
format="{down} ↓↑ {up}",
|
||||
padding=5,
|
||||
),
|
||||
]
|
||||
for i, interface in enumerate(
|
||||
os.popen(
|
||||
"ifconfig -s | grep -wv -e Iface -e lo | awk {'print $1'} | tac"
|
||||
[
|
||||
*(
|
||||
[widget.Sep(linewidth=2, padding=3)]
|
||||
if i != 0
|
||||
else []
|
||||
),
|
||||
widget.TextBox(text=f"{interface}:", padding=2),
|
||||
widget.Net(
|
||||
interface=interface,
|
||||
format="{down} ↓↑ {up}",
|
||||
padding=5,
|
||||
),
|
||||
]
|
||||
for i, interface in enumerate(
|
||||
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