From af1e3135cf20c828b20276d385ee5a401108072d Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 10 Aug 2021 17:20:18 +0200 Subject: [PATCH] polybar-weather: log city, just in case --- bin/polybar-weather | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/polybar-weather b/bin/polybar-weather index 9faad07..9dde0bd 100755 --- a/bin/polybar-weather +++ b/bin/polybar-weather @@ -160,7 +160,8 @@ if __name__ == "__main__": options.owm_api_key, *location, options.forecasts ) description = forecast_weather["list"][0]["weather"][0]["description"] - logger.info(f"current weather: {description}") + city = forecast_weather['city']['name'] + logger.info(f"current weather at {city}: {description}") # Format output forecasts = [format_weather(data) for data in forecast_weather["list"]] @@ -169,8 +170,7 @@ if __name__ == "__main__": forecasts.pop() else: break - output = " ".join(forecasts) - output = output.replace("%{Tx}", "%%{T%d}" % options.font_index) + output = " ".join(forecasts).replace("%{Tx}", "%%{T%d}" % options.font_index) logger.debug("output: %s", output) update_status(output, options.output)