X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/c9634bf976a9d8b5f9606fdb8e2373f7e3bed8ac..cec4a68c630b93315c43f53eef3f9a416726a3a3:/widgets/yawn/init.lua diff --git a/widgets/yawn/init.lua b/widgets/yawn/init.lua index a2f756e..af7befc 100644 --- a/widgets/yawn/init.lua +++ b/widgets/yawn/init.lua @@ -1,3 +1,4 @@ + --[[ Licensed under GNU General Public License v2 @@ -46,7 +47,7 @@ yawn_notification_preset = {} local function fetch_weather() local url = api_url .. units_set .. city_id - local f = io.popen("curl --connect-timeout 1 -fsm 1 '" .. url .. "'" ) + local f = io.popen("curl --connect-timeout 1 -fsm 3 '" .. url .. "'" ) local text = f:read("*all") f:close() @@ -57,12 +58,12 @@ local function fetch_weather() yawn.icon:set_image(icon_path .. "na.png") if text == "" then weather_data = "Service not available at the moment." - yawn.widget:set_text(" N/A") + yawn.widget:set_text(" N/A ") else weather_data = "City not found!\n" .. "Are you sure " .. city_id .. " is your Yahoo city ID?" - yawn.widget:set_text(" ?") + yawn.widget:set_text(" ? ") end return end