You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried to read the wiki but I can't fathom why when U try to include a setting for units on the net widget it has no effect and doesn't produce an error.
My expected behaviour is that when I add units = 1024^2 the metrics displayed in the widget will change from a 4-5 digit number (8546.3) to a 1 or 2 digit number (5.6)
This is the widget I'm using:
-- Net
local neticon = wibox.widget.imagebox(theme.widget_net)
local net = lain.widget.net({
settings = function()
units = 1024^2
widget:set_markup(markup.font(theme.font,
markup("#7AC82E", " " .. net_now.received)
.. " " ..
markup("#46A8C3", " " .. net_now.sent .. " ")))
end
})
The units setting is being ignored as I still see a 4 digit number for received and sent, now considering my connection is 69 mb/ps I'd expect to see maybe 6.9 or lower if it was displaying megabytes.
I hope someone can help as I'm finding this quite confusing as I'm not a programmer and have no full grasp of lua.
Cheers
The text was updated successfully, but these errors were encountered:
-- Net
local neticon = wibox.widget.imagebox(theme.widget_net)
local net = lain.widget.net({
units = 1024^2 --<<It needs to be placed here
settings = function()
widget:set_markup(markup.font(theme.font,
markup("#7AC82E", " " .. net_now.received)
.. " " ..
markup("#46A8C3", " " .. net_now.sent .. " ")))
end
})
It really would be great if the wiki went into more detail about placement of these things.
Cheers
The wiki specifies that the input argument of the widget is a table, in which units and settings are two separate entities. Here, it also refers to awesome-copycats for examples. I thought these were enough details.
But I am obviously open to suggestions. Feel free to propose me modifications to the wiki.
Hi,
I've tried to read the wiki but I can't fathom why when U try to include a setting for units on the net widget it has no effect and doesn't produce an error.
My expected behaviour is that when I add
units = 1024^2
the metrics displayed in the widget will change from a 4-5 digit number (8546.3) to a 1 or 2 digit number (5.6)This is the widget I'm using:
The units setting is being ignored as I still see a 4 digit number for received and sent, now considering my connection is 69 mb/ps I'd expect to see maybe 6.9 or lower if it was displaying megabytes.
I hope someone can help as I'm finding this quite confusing as I'm not a programmer and have no full grasp of lua.
Cheers
The text was updated successfully, but these errors were encountered: