X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/ca6119899ad44854d75d7a89ffaa4e65bcce3b3e..b658401b3307992aef9ff284c8b836a329cfd8b5:/widgets/weather.lua diff --git a/widgets/weather.lua b/widgets/weather.lua index b745ebe..de3163c 100644 --- a/widgets/weather.lua +++ b/widgets/weather.lua @@ -41,7 +41,7 @@ local function worker(args) local date_cmd = args.date_cmd or "date -u -d @%d +'%%a %%d'" local icons_path = args.icons_path or lain_icons .. "openweathermap/" local notification_preset = args.notification_preset or {} - local notification_text_cmd = args.notification_text_cmd or + local notification_text_fun = args.notification_text_fun or function (day, desc, tmin, tmax) return string.format("%s: %s, %d - %d ", day, desc, tmin, tmax) end @@ -98,7 +98,7 @@ local function worker(args) local desc = weather_now["list"][i]["weather"][1]["description"] weather.notification_text = weather.notification_text .. - notification_text_cmd(day, desc, tmin, tmax) + notification_text_fun(day, desc, tmin, tmax) if i < weather_now["cnt"] then weather.notification_text = weather.notification_text .. "\n" @@ -132,7 +132,7 @@ local function worker(args) weather.attach(weather.widget) newtimer("weather-" .. city_id, timeout, weather.update) - newtimer("weather_forecast" .. city_id, timeout, weather.forecast_update) + newtimer("weather_forecast-" .. city_id, timeout, weather.forecast_update) return setmetatable(weather, { __index = weather.widget }) end