centre task list widget

This commit is contained in:
Izaya 2022-09-12 01:23:21 +10:00
parent d1ad2870b5
commit 39012655b9

View File

@ -60,6 +60,7 @@ function switcherpopup.new(s)
pcall(v.update, v)
end
tasklistWidget:reset()
tasklistWidget.forced_num_cols = math.min(math.floor(s.geometry.width / (switcherpopup.iconSize + switcherpopup.spacing)), #awful.screen.focused().selected_tag:clients())
for k,v in pairs(awful.screen.focused().selected_tag:clients()) do
local clientIcon = awful.widget.clienticon(v)
clientIcon:set_forced_width(switcherpopup.iconSize)
@ -158,7 +159,7 @@ function switcherpopup.new(s)
systray:set_screen(s)
systray:set_horizontal(true)
popup = awful.popup {
widget = {layout = wibox.layout.fixed.vertical, clock, wibox.container.place(indicators), wibox.container.place(systray), tasklistWidget, wibox.container.place(tagbuttons)},
widget = {layout = wibox.layout.fixed.vertical, clock, wibox.container.place(indicators), wibox.container.place(systray), wibox.container.place(tasklistWidget), wibox.container.place(tagbuttons)},
border_color = beautiful.border_focus,
border_width = 2,
ontop = true,