diff --git a/widget/app_launcher/prompt.lua b/widget/app_launcher/prompt.lua index 87e2078..7c220c2 100644 --- a/widget/app_launcher/prompt.lua +++ b/widget/app_launcher/prompt.lua @@ -13,6 +13,7 @@ local tonumber = tonumber local ceil = math.ceil local ipairs = ipairs local string = string +local type = type local capi = { awesome = awesome, root = root, @@ -78,7 +79,6 @@ end local function generate_markup(self) local wp = self._private - local icon_size = dpi(ceil(wp.icon_size * 1024)) local label_size = dpi(ceil(wp.label_size * 1024)) local text_size = dpi(ceil(wp.text_size * 1024)) local cursor_size = dpi(ceil(wp.cursor_size * 1024)) @@ -90,9 +90,17 @@ local function generate_markup(self) local markup = "" if wp.icon ~= nil then - markup = string.format( - '%s ', - wp.icon.font, icon_size, wp.icon_color, wp.icon.icon) + if type(wp.icon) == "table" then + local icon_size = dpi(ceil(wp.icon.size * 1024)) + markup = string.format( + '%s ', + wp.icon.font, icon_size, wp.icon.color, wp.icon.icon) + else + local icon_size = dpi(ceil(wp.icon_size * 1024)) + markup = string.format( + '%s ', + wp.icon_font, icon_size, wp.icon_color, wp.icon) + end end if self._private.state == true then