Open emxxjnm opened 1 year ago
You can try this
os = {
function()
return Tools.get_os()
end,
icon = setmetatable({}, {
__index = function(_, k)
local os = Tools.get_os()
if k == 1 then
return WBIcons.get_icons_by_operating_system()[os].icon
elseif k == 'color' then
return { fg = WBIcons.get_icons_by_operating_system()[os].color }
end
end
}),
},
Requested feature
The component's icon accepts a function.
Motivation