summaryrefslogtreecommitdiff
path: root/weather-widget/weather.lua
diff options
context:
space:
mode:
authorAurélien LAJOIE <orel@melix.net>2019-09-18 01:31:26 +0200
committerAurélien LAJOIE <orel@melix.net>2019-09-18 01:31:26 +0200
commite154daa8b67b0e10b9615ef68852fab1f8ec29bb (patch)
treeda382aceb80528235f4f8f88f3cc580389dfb0f8 /weather-widget/weather.lua
parent59ce0053ac15f862e9571034cac28fd1063bef0e (diff)
[Weather] Add option to set the position of the notification
Diffstat (limited to 'weather-widget/weather.lua')
-rw-r--r--weather-widget/weather.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua
index 09eeeec..9befd6b 100644
--- a/weather-widget/weather.lua
+++ b/weather-widget/weather.lua
@@ -28,6 +28,7 @@ local function worker(args)
local units = args.units or 'metric'
local both_units_widget = args.both_units_widget or false
local both_units_popup = args.both_units_popup or false
+ local position = args.notification_position or "top_right"
local weather_api_url = (
'https://api.openweathermap.org/data/2.5/weather'
@@ -204,6 +205,7 @@ local function worker(args)
'<b>Clouds:</b> ' .. resp.clouds.all .. '%<br>' ..
'<b>Wind:</b> ' .. resp.wind.speed .. 'm/s (' .. to_direction(resp.wind.deg) .. ')',
timeout = 5, hover_timeout = 10,
+ position = position,
width = (both_units_popup == true and 210 or 200)
}
end)