mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-16 13:14:20 +02:00
polybar-weather: log city, just in case
This commit is contained in:
parent
9e55aa23b9
commit
af1e3135cf
1 changed files with 3 additions and 3 deletions
|
@ -160,7 +160,8 @@ if __name__ == "__main__":
|
||||||
options.owm_api_key, *location, options.forecasts
|
options.owm_api_key, *location, options.forecasts
|
||||||
)
|
)
|
||||||
description = forecast_weather["list"][0]["weather"][0]["description"]
|
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
|
# Format output
|
||||||
forecasts = [format_weather(data) for data in forecast_weather["list"]]
|
forecasts = [format_weather(data) for data in forecast_weather["list"]]
|
||||||
|
@ -169,8 +170,7 @@ if __name__ == "__main__":
|
||||||
forecasts.pop()
|
forecasts.pop()
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
output = " ".join(forecasts)
|
output = " ".join(forecasts).replace("%{Tx}", "%%{T%d}" % options.font_index)
|
||||||
output = output.replace("%{Tx}", "%%{T%d}" % options.font_index)
|
|
||||||
logger.debug("output: %s", output)
|
logger.debug("output: %s", output)
|
||||||
|
|
||||||
update_status(output, options.output)
|
update_status(output, options.output)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue