X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/1e773f976342f86715cc1192a384a4cbb3963cf8..c886c5497ddc68fb78655ef1e3dc7c991dac4e08:/widgets/weather.lua diff --git a/widgets/weather.lua b/widgets/weather.lua index dacdd41..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"