fix #2, format with stylua

This commit is contained in:
BZ 2022-01-02 22:11:36 +01:00
parent 5deb3cb960
commit 56890bacfb
1 changed files with 100 additions and 96 deletions

View File

@ -75,16 +75,16 @@ local function setup(config)
delay = cfg.delay or 0.5
local fallback_icon = cfg.fallback_icon or theme.ic_fallback_icon or nil
if type(icons) ~= 'table' then
if type(icons) ~= "table" then
icons = {}
end
if type(dynamic_icons) ~= 'table' then
if type(dynamic_icons) ~= "table" then
dynamic_icons = {}
end
if type(dynamic_classes) ~= 'table' then
if type(dynamic_classes) ~= "table" then
dynamic_classes = {}
end
if type(delay) ~= 'number' then
if type(delay) ~= "number" then
delay = 0.5
end
@ -97,6 +97,10 @@ local function setup(config)
elseif not c.icon and fallback_icon then
set_icon(c, fallback_icon)
end
-- fix #2: Dynamic icons not working without changing the window name
if contains(dynamic_classes, c.class) then
set_dynamic_icon(c)
end
end
end)