summaryrefslogtreecommitdiff
path: root/weather-widget
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2018-03-21 19:16:43 +0100
committerSviatoslav Sydorenko <wk@sydorenko.org.ua>2018-03-21 19:16:43 +0100
commit5a5c9eb8f0bfedbc96a8e82f765d686267f5d5ce (patch)
tree7c6ee3fe72eddb603fa9570a8973c9df39068a48 /weather-widget
parent74f3d82bddcfd36b92faa6fdfdd34863537a2c70 (diff)
Read city and api key from env first
Corresponding env vars are: * AWW_WEATHER_CITY * AWW_WEATHER_API_KEY
Diffstat (limited to 'weather-widget')
-rw-r--r--weather-widget/weather.lua4
1 files 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 {