From f4beef7396987a2d466a693ab92ac9c73b06e3c7 Mon Sep 17 00:00:00 2001 From: Jeferson Siqueira Date: Sun, 10 Nov 2019 16:04:22 +0000 Subject: [PATCH] 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. --- themes/powerarrow-dark/theme.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/powerarrow-dark/theme.lua b/themes/powerarrow-dark/theme.lua index 9bc46ea..29bc468 100644 --- a/themes/powerarrow-dark/theme.lua +++ b/themes/powerarrow-dark/theme.lua @@ -257,9 +257,9 @@ local neticon = wibox.widget.imagebox(theme.widget_net) local net = lain.widget.net({ settings = function() 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 })