From 5a5c9eb8f0bfedbc96a8e82f765d686267f5d5ce Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 21 Mar 2018 19:16:43 +0100 Subject: Read city and api key from env first Corresponding env vars are: * AWW_WEATHER_CITY * AWW_WEATHER_API_KEY --- weather-widget/weather.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua index 07863dd..c8b1358 100644 --- a/weather-widget/weather.lua +++ b/weather-widget/weather.lua @@ -11,8 +11,8 @@ local json = require("json") local naughty = require("naughty") local wibox = require("wibox") -local city = "Montreal,ca" -local open_map_key = 'c3d7320b359da4e48c2d682a04076576' +local city = os.getenv("AWW_WEATHER_CITY") or "Montreal,ca" +local open_map_key = os.getenv("AWW_WEATHER_API_KEY") or 'c3d7320b359da4e48c2d682a04076576' local path_to_icons = "/usr/share/icons/Arc/status/symbolic/" local icon_widget = wibox.widget { -- cgit v1.2.3