Merge branch 'master' of github.com:streetturtle/awesome-wm-widgets
This commit is contained in:
commit
50fbb55299
|
@ -101,8 +101,8 @@ weather_curl_widget({
|
||||||
...
|
...
|
||||||
--default
|
--default
|
||||||
weather_widget({
|
weather_widget({
|
||||||
|
api_key='<your-key>',
|
||||||
coordinates = {45.5017, -73.5673},
|
coordinates = {45.5017, -73.5673},
|
||||||
api_key='c3d7320b359da4e48c2d682a04076576',
|
|
||||||
}),
|
}),
|
||||||
,
|
,
|
||||||
--customized
|
--customized
|
||||||
|
|
|
@ -393,7 +393,9 @@ local function worker(args)
|
||||||
local function update_widget(widget, stdout, stderr)
|
local function update_widget(widget, stdout, stderr)
|
||||||
if stderr ~= '' then
|
if stderr ~= '' then
|
||||||
if not warning_shown then
|
if not warning_shown then
|
||||||
|
if stderr ~= 'curl: (52) Empty reply from server' then
|
||||||
show_warning(stderr)
|
show_warning(stderr)
|
||||||
|
end
|
||||||
warning_shown = true
|
warning_shown = true
|
||||||
widget:is_ok(false)
|
widget:is_ok(false)
|
||||||
tooltip:add_to_object(widget)
|
tooltip:add_to_object(widget)
|
||||||
|
@ -450,7 +452,11 @@ local function worker(args)
|
||||||
end)))
|
end)))
|
||||||
|
|
||||||
-- watch('cat /home/pmakhov/.config/awesome/awesome-wm-widgets/weather-widget/weather.json', 5, update_widget, weather_widget)
|
-- watch('cat /home/pmakhov/.config/awesome/awesome-wm-widgets/weather-widget/weather.json', 5, update_widget, weather_widget)
|
||||||
watch(string.format(GET_FORECAST_CMD, owm_one_cal_api), 5, update_widget, weather_widget)
|
watch(
|
||||||
|
string.format(GET_FORECAST_CMD, owm_one_cal_api),
|
||||||
|
120, -- API limit is 1k req/day; day has 1440 min; every 2 min is good
|
||||||
|
update_widget, weather_widget,
|
||||||
|
)
|
||||||
|
|
||||||
return weather_widget
|
return weather_widget
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue