1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-22 19:22:32 +00:00

Using string.format() on the net widget in powerarrow-dark.

As the net usage varies, so the numbers on the widget does. The problem is
that it makes the whole widget bar to go back and forth as the numbers change.
Adding a 'padding' number of zeroes reduces the number of 'moves' of the
widget row, and does not reduces the visibility of the widgets.
This commit is contained in:
Jeferson Siqueira 2019-11-10 16:04:22 +00:00 committed by Luca CPZ
parent 7bad166f51
commit 0d60af1161

View file

@ -247,9 +247,9 @@ local neticon = wibox.widget.imagebox(theme.widget_net)
local net = lain.widget.net({ local net = lain.widget.net({
settings = function() settings = function()
widget:set_markup(markup.font(theme.font, widget:set_markup(markup.font(theme.font,
markup("#7AC82E", " " .. net_now.received) markup("#7AC82E", " " .. string.format("%06.1f", net_now.received))
.. " " .. .. " " ..
markup("#46A8C3", " " .. net_now.sent .. " "))) markup("#46A8C3", " " .. string.format("%06.1f", net_now.sent) .. " ")))
end end
}) })