local gstring = require "gears.string" local M = {} --- Generate a shim to allow indexing an iconset as a Lua table ---@param path string ---@return table function M.new(path) return setmetatable({}, { ---@param icon string __index = function(self, icon) return path .. (gstring.endswith(path, "/") and "" or "/") .. icon:gsub("_", "-") .. ".svg" end, }) end return setmetatable(M, { __call = function(_, ...) return M.new(...) end, })