Added padding to make the widgets less jumpy
This commit is contained in:
		@@ -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,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user