[awesome] network widgets: only use specified interfaces (not docker0)

This commit is contained in:
Simon Bruder 2019-03-27 19:17:26 +00:00
parent ba51a57b47
commit e23eef7cf2
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -8,11 +8,14 @@ local theme = require("theme")
local gfs = require("gears.filesystem")
local iconsdir = gfs.get_configuration_dir() .. "icons/"
local network_interfaces = {"enp0s25", "wlp3s0"}
local widgets = {}
widgets.netdown_icon = wibox.widget.imagebox(iconsdir .. "down.png")
widgets.netdown = lain.widget.net({
units = 1024^2,
iface = network_interfaces,
settings = function()
widget:set_markup(markup.fontfg(theme.font, theme.colors.green, net_now.received .. "MiB/s "))
end
@ -21,6 +24,7 @@ widgets.netdown = lain.widget.net({
widgets.netup_icon = wibox.widget.imagebox(iconsdir .. "up.png")
widgets.netup = lain.widget.net({
units = 1024^2,
iface = network_interfaces,
settings = function()
widget:set_markup(markup.fontfg(theme.font, theme.colors.red, net_now.sent .. "MiB/s "))
end