fix #2, format with stylua
This commit is contained in:
parent
5deb3cb960
commit
56890bacfb
12
init.lua
12
init.lua
|
@ -75,16 +75,16 @@ local function setup(config)
|
||||||
delay = cfg.delay or 0.5
|
delay = cfg.delay or 0.5
|
||||||
local fallback_icon = cfg.fallback_icon or theme.ic_fallback_icon or nil
|
local fallback_icon = cfg.fallback_icon or theme.ic_fallback_icon or nil
|
||||||
|
|
||||||
if type(icons) ~= 'table' then
|
if type(icons) ~= "table" then
|
||||||
icons = {}
|
icons = {}
|
||||||
end
|
end
|
||||||
if type(dynamic_icons) ~= 'table' then
|
if type(dynamic_icons) ~= "table" then
|
||||||
dynamic_icons = {}
|
dynamic_icons = {}
|
||||||
end
|
end
|
||||||
if type(dynamic_classes) ~= 'table' then
|
if type(dynamic_classes) ~= "table" then
|
||||||
dynamic_classes = {}
|
dynamic_classes = {}
|
||||||
end
|
end
|
||||||
if type(delay) ~= 'number' then
|
if type(delay) ~= "number" then
|
||||||
delay = 0.5
|
delay = 0.5
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -97,6 +97,10 @@ local function setup(config)
|
||||||
elseif not c.icon and fallback_icon then
|
elseif not c.icon and fallback_icon then
|
||||||
set_icon(c, fallback_icon)
|
set_icon(c, fallback_icon)
|
||||||
end
|
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
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue