dynamically calculate the correct number of columns for icons

This commit is contained in:
Izaya 2022-03-03 20:34:50 +11:00
parent 7a3de33283
commit 2e7c161f56

View File

@ -19,7 +19,7 @@ systray:set_base_size(switcherpopup.systraySize)
function switcherpopup.new(s)
local popup = false
local tasklistWidget = wibox.widget{
layout = wibox.layout.grid.vertical(5)
layout = wibox.layout.grid.vertical(math.floor(s.geometry.width / (switcherpopup.iconSize + switcherpopup.spacing)))
}
local clock = wibox.container.place(wibox.widget.textclock("%H:%M %Y-%m-%d"), "center", "center")
local tagindex = wibox.widget({widget = wibox.widget.textbox, align = "center"})