24 lines
590 B
Lua
24 lines
590 B
Lua
|
local theme = require('theme.base_theme')
|
||
|
local lain = require('lain')
|
||
|
local wibox = require('wibox')
|
||
|
|
||
|
local netdowninfo = wibox.widget.textbox()
|
||
|
local netupinfo = lain.widget.net({
|
||
|
settings = function()
|
||
|
-- luacheck: globals widget net_now
|
||
|
widget:set_text(net_now.sent)
|
||
|
netdowninfo:set_text(net_now.received)
|
||
|
end,
|
||
|
})
|
||
|
|
||
|
return {
|
||
|
{
|
||
|
widget = wibox.layout.fixed.horizontal(wibox.widget.imagebox(theme.widget_netdown), netdowninfo),
|
||
|
bg = '#87af5f',
|
||
|
},
|
||
|
{
|
||
|
widget = wibox.layout.fixed.horizontal(wibox.widget.imagebox(theme.widget_netup), netupinfo.widget),
|
||
|
bg = '#e54c62',
|
||
|
},
|
||
|
}
|