X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/cec4a68c630b93315c43f53eef3f9a416726a3a3..ad1c15b7c11d779eec233edc5df8a1e1f874fd63:/widgets/yawn/init.lua diff --git a/widgets/yawn/init.lua b/widgets/yawn/init.lua index af7befc..86a2d0f 100644 --- a/widgets/yawn/init.lua +++ b/widgets/yawn/init.lua @@ -75,7 +75,7 @@ local function fetch_weather() -- may still happens in case of bad connectivity if weather_data == "" then yawn.icon:set_image(icon_path .. "na.png") - yawn.widget:set_text(" ?") + yawn.widget:set_text(" ? ") return end @@ -135,7 +135,8 @@ local function fetch_weather() yawn.icon:set_image(sky) widget = yawn.widget - forecast = weather_data:match(": %S.-,"):gsub(": ", ""):gsub(",", "") + _data = weather_data:match(": %S.-,") or weather_data + forecast = _data:gsub(": ", ""):gsub(",", "") units = units:gsub(" ", "") settings()