X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/0279482eeb5867f49b4efc83d591393f9c3d0adb..a00417d8011690d977cbdab1f1378ec369e5f355:/widgets/weather.lua diff --git a/widgets/weather.lua b/widgets/weather.lua index 17b3d34..ff86d7e 100644 --- a/widgets/weather.lua +++ b/widgets/weather.lua @@ -10,19 +10,15 @@ local async = require("lain.helpers").async local newtimer = require("lain.helpers").newtimer local lain_icons = require("lain.helpers").icons_dir local json = require("lain.util").dkjson - local focused = require("awful.screen").focused local naughty = require("naughty") local wibox = require("wibox") - local math = { floor = math.floor } local os = { time = os.time, date = os.date, difftime = os.difftime } local string = { format = string.format, gsub = string.gsub } - -local mouse = mouse local tonumber = tonumber local setmetatable = setmetatable @@ -164,8 +160,8 @@ local function worker(args) weather.attach(weather.widget) - newtimer("weather-" .. city_id, timeout, weather.update) - newtimer("weather_forecast-" .. city_id, timeout, weather.forecast_update) + weather.timer = newtimer("weather-" .. city_id, timeout, weather.update, false, true) + weather.timer_forecast = newtimer("weather_forecast-" .. city_id, timeout, weather.forecast_update, false, true) return setmetatable(weather, { __index = weather.widget }) end