mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-29 13:00:02 +02:00
polybar-weather: tell where to find weather icons
This commit is contained in:
parent
78004178e4
commit
e88352aa67
1 changed files with 1 additions and 0 deletions
|
@ -45,6 +45,7 @@ def get_weather(apikey, latitude, longitude, endpoint):
|
||||||
|
|
||||||
def format_weather(data):
|
def format_weather(data):
|
||||||
"""Translate OWM icon to WeatherIcons."""
|
"""Translate OWM icon to WeatherIcons."""
|
||||||
|
# https://erikflowers.github.io/weather-icons/
|
||||||
icon = data["weather"][0]["icon"]
|
icon = data["weather"][0]["icon"]
|
||||||
temperature = data["main"]["temp"]
|
temperature = data["main"]["temp"]
|
||||||
if icon == "01d" and temperature > 32:
|
if icon == "01d" and temperature > 32:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue