[awesome] network widgets: only use specified interfaces (not docker0)
This commit is contained in:
parent
ba51a57b47
commit
e23eef7cf2
|
@ -8,11 +8,14 @@ local theme = require("theme")
|
||||||
local gfs = require("gears.filesystem")
|
local gfs = require("gears.filesystem")
|
||||||
local iconsdir = gfs.get_configuration_dir() .. "icons/"
|
local iconsdir = gfs.get_configuration_dir() .. "icons/"
|
||||||
|
|
||||||
|
local network_interfaces = {"enp0s25", "wlp3s0"}
|
||||||
|
|
||||||
local widgets = {}
|
local widgets = {}
|
||||||
|
|
||||||
widgets.netdown_icon = wibox.widget.imagebox(iconsdir .. "down.png")
|
widgets.netdown_icon = wibox.widget.imagebox(iconsdir .. "down.png")
|
||||||
widgets.netdown = lain.widget.net({
|
widgets.netdown = lain.widget.net({
|
||||||
units = 1024^2,
|
units = 1024^2,
|
||||||
|
iface = network_interfaces,
|
||||||
settings = function()
|
settings = function()
|
||||||
widget:set_markup(markup.fontfg(theme.font, theme.colors.green, net_now.received .. "MiB/s "))
|
widget:set_markup(markup.fontfg(theme.font, theme.colors.green, net_now.received .. "MiB/s "))
|
||||||
end
|
end
|
||||||
|
@ -21,6 +24,7 @@ widgets.netdown = lain.widget.net({
|
||||||
widgets.netup_icon = wibox.widget.imagebox(iconsdir .. "up.png")
|
widgets.netup_icon = wibox.widget.imagebox(iconsdir .. "up.png")
|
||||||
widgets.netup = lain.widget.net({
|
widgets.netup = lain.widget.net({
|
||||||
units = 1024^2,
|
units = 1024^2,
|
||||||
|
iface = network_interfaces,
|
||||||
settings = function()
|
settings = function()
|
||||||
widget:set_markup(markup.fontfg(theme.font, theme.colors.red, net_now.sent .. "MiB/s "))
|
widget:set_markup(markup.fontfg(theme.font, theme.colors.red, net_now.sent .. "MiB/s "))
|
||||||
end
|
end
|
||||||
|
|
Reference in a new issue