Added padding to make the widgets less jumpy

This commit is contained in:
Mutzi 2024-07-06 20:53:44 +02:00
parent b5f83958c9
commit 134575e0fe
Signed by: root
GPG Key ID: 2437494E09F13876
3 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ local wibox = require('wibox')
local cpu = lain.widget.cpu({ local cpu = lain.widget.cpu({
settings = function() settings = function()
-- luacheck: globals widget cpu_now -- luacheck: globals widget cpu_now
widget:set_text(cpu_now.usage .. '%') widget:set_text(string.format('%3d%%', cpu_now.usage))
end, end,
}) })

View File

@ -5,7 +5,7 @@ local theme = require('src.theme')
local memory = lain.widget.mem({ local memory = lain.widget.mem({
settings = function() settings = function()
-- luacheck: globals widget mem_now -- luacheck: globals widget mem_now
widget:set_text(mem_now.used .. 'M') widget:set_text(string.format('%5dM', mem_now.used))
end, end,
}) })

View File

@ -6,8 +6,8 @@ local netdowninfo = wibox.widget.textbox()
local netupinfo = lain.widget.net({ local netupinfo = lain.widget.net({
settings = function() settings = function()
-- luacheck: globals widget net_now -- luacheck: globals widget net_now
widget:set_text(net_now.sent) widget:set_text(string.format('%7.2f', net_now.sent))
netdowninfo:set_text(net_now.received) netdowninfo:set_text(string.format('%8.2f', net_now.received))
end, end,
}) })