diff --git a/connman_widget-0.1.1-1.rockspec b/connman_widget-0.1.2-1.rockspec similarity index 93% rename from connman_widget-0.1.1-1.rockspec rename to connman_widget-0.1.2-1.rockspec index b1df65a..e69cb00 100644 --- a/connman_widget-0.1.1-1.rockspec +++ b/connman_widget-0.1.2-1.rockspec @@ -1,8 +1,8 @@ package = "connman_widget" -version = "0.1.1-1" +version = "0.1.2-1" source = { url = "git://github.com/stefano-m/awesome-connman_widget", - tag = "v0.1.1" + tag = "v0.1.2" } description = { summary = "A Connman widget for the Awesome Window Manager", diff --git a/connman_widget.lua b/connman_widget.lua index 986aa5e..75eb5e3 100644 --- a/connman_widget.lua +++ b/connman_widget.lua @@ -178,10 +178,12 @@ local function get_status_icon(mgr) return build_icon_path(icon_statuses.unspecified.idle) elseif mgr.current_service then local service = mgr.current_service - return service_types[service.Type](service) - else - return build_icon_path(icon_statuses.unspecified.err) + local f = service_types[service.Type] + if type(f) == "function" then + return f(service) + end end + return build_icon_path(icon_statuses.unspecified.err) end local widget = wibox.widget.imagebox()