Switch completely to Gio for icons and it fixed the startup/lookup time for icons. Now works with every icon theme. Taglist/Tasklist/Window switcher still rely on WM_CLASS and WM_NAME to match the icon name, this probably can't be fixed in a sane way

This commit is contained in:
Rene
2022-08-01 23:39:45 +02:00
parent 978a8580c8
commit e425b7b79e
9 changed files with 104 additions and 20 deletions

View File

@@ -82,7 +82,7 @@ local list_update = function(widget, buttons, _, _, objects)
id = "icon_container",
{
id = "icon",
image = client.icon,
image = Get_icon(client.class, client.name) or client.icon,
resize = true,
valign = "center",
halign = "center",
@@ -95,8 +95,6 @@ local list_update = function(widget, buttons, _, _, objects)
widget = wibox.container.margin
}
icon.icon_container.icon:set_image(xdg_icon_lookup:find_icon(client.class, 64) or client.icon)
tag_widget.container:setup({
icon,
strategy = "exact",

View File

@@ -22,7 +22,7 @@ local list_update = function(widget, buttons, label, _, objects)
valign = "center",
halign = "center",
resize = true,
image = object.icon,
image = Get_icon(object.class, object.name) or object.icon,
widget = wibox.widget.imagebox
},
nil,
@@ -114,8 +114,7 @@ local list_update = function(widget, buttons, label, _, objects)
task_widget:set_bg(Theme_config.tasklist.bg)
task_widget.container.layout_it.title:set_text('')
end
task_widget:get_children_by_id("icon")[1]:set_image(xdg_icon_lookup:find_icon(object.class, 64) or
object.icon)
widget:add(task_widget)
widget:set_spacing(dpi(6))