我目前正在使用这部分conkyrc
代码来监控 CONKY 小部件中的其中一个 WIFI,但我想监控两个 (2) wifi 设备 (wlp2s0 和 wlx8416f91d3f6d) - 有什么想法吗?
${font Ubuntu:bold:size=10}NETWORK ${hr 2}
${font sans-serif:normal:size=8}Local IPs:${alignr}External IP:
${execi 1000 ip a | grep inet | grep -vw lo | grep -v inet6 | cut -d \/ -f1 | sed 's/[^0-9\.]*//g'} ${alignr}${execi 1000 wget -q -O- http://ipecho.net/plain; echo}
${font sans-serif:normal:size=8}Down: ${downspeed wlx8416f91d3f6d} ${alignr}Up: ${upspeed wlx8416f91d3f6d}
${color lightgray}${downspeedgraph wlx8416f91d3f6d 80,130 } ${alignr}${upspeedgraph wlx8416f91d3f6d 80,130 }$color
答案1
这段代码成功了!
${font Ubuntu:bold:size=10}网络 ${hr 2} ${font sans-serif:normal:size=8}本地 IP:${alignr}外部 IP:${execi 1000 ip a | grep inet | grep -vw lo | grep -v inet6 | cut -d / -f1 | sed 's/[^0-9.]*//g'} ${alignr}${execi 1000 wget -q -O-http://ipecho.net/plain;echo} ${font sans-serif:normal:size=8}向下:${downspeed wlx8416f91d3f6d} ${alignr}向上:${upspeed wlx8416f91d3f6d} ${color lightgray}${downspeedgraph wlx8416f91d3f6d 40,150 } ${alignr}${upspeedgraph wlx8416f91d3f6d 40,150 }$color ${font sans-serif:normal:size=8}向下:${downspeed wlp2s0} ${alignr}向上:${upspeed wlp2s0} ${color lightgray}${downspeedgraph wlp2s0 40,150 } ${alignr}${upspeedgraph wlp2s0 40,150 }$color
这是我现在的 CONKY Widget: