summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weather-widget/README.md15
-rw-r--r--weather-widget/both.pngbin0 -> 31867 bytes
-rw-r--r--weather-widget/example1.png (renamed from weather-widget/screenshots/example1.png)bin46387 -> 46387 bytes
-rw-r--r--weather-widget/example2.png (renamed from weather-widget/screenshots/example2.png)bin26446 -> 26446 bytes
-rw-r--r--weather-widget/example_response.json1419
-rw-r--r--weather-widget/negative.pngbin0 -> 32058 bytes
-rw-r--r--weather-widget/screenshots/weather-widget.pngbin26906 -> 0 bytes
-rw-r--r--weather-widget/weather-widget.pngbin22673 -> 26906 bytes
-rw-r--r--weather-widget/weather.json1224
-rw-r--r--weather-widget/weather.lua119
10 files changed, 1529 insertions, 1248 deletions
diff --git a/weather-widget/README.md b/weather-widget/README.md
index e573bd4..2b43d3a 100644
--- a/weather-widget/README.md
+++ b/weather-widget/README.md
@@ -47,7 +47,7 @@ To add your custom icons, create a folder with the pack name under `/icons` and
#### Custom font, icons
-![example1](./screenshots/example1.png)
+![example1](./example1.png)
```lua
weather_curl_widget({
@@ -65,7 +65,7 @@ weather_curl_widget({
#### Only current weather
-![example2](./screenshots/example2.png)
+![example2](./example2.png)
```lua
weather_curl_widget({
@@ -74,8 +74,6 @@ weather_curl_widget({
}),
```
-
-
## Installation
1. Download json parser for lua from [github.com/rxi/json.lua](https://github.com/rxi/json.lua) and place it under **~/.config/awesome/** (don't forget to star a repo <i class="fa fa-github-alt"></i> ):
@@ -126,6 +124,15 @@ weather_curl_widget({
...
```
+## More screenshots
+
+Only negative temperature:
+
+![negative](./negative.png)
+
+Both positive and negative tempertature:
+
+![both](./both.png)
## How it works
diff --git a/weather-widget/both.png b/weather-widget/both.png
new file mode 100644
index 0000000..0947a37
--- /dev/null
+++ b/weather-widget/both.png
Binary files differ
diff --git a/weather-widget/screenshots/example1.png b/weather-widget/example1.png
index 7074faa..7074faa 100644
--- a/weather-widget/screenshots/example1.png
+++ b/weather-widget/example1.png
Binary files differ
diff --git a/weather-widget/screenshots/example2.png b/weather-widget/example2.png
index 857274b..857274b 100644
--- a/weather-widget/screenshots/example2.png
+++ b/weather-widget/example2.png
Binary files differ
diff --git a/weather-widget/example_response.json b/weather-widget/example_response.json
new file mode 100644
index 0000000..2b90a6e
--- /dev/null
+++ b/weather-widget/example_response.json
@@ -0,0 +1,1419 @@
+{
+ "lat": 45.5,
+ "lon": -73.57,
+ "timezone": "America/Toronto",
+ "timezone_offset": -14400,
+ "current": {
+ "dt": 1603155313,
+ "sunrise": 1603106181,
+ "sunset": 1603144896,
+ "temp": 8.91,
+ "feels_like": 7.97,
+ "pressure": 1025,
+ "humidity": 100,
+ "dew_point": 8.91,
+ "uvi": 2.37,
+ "clouds": 90,
+ "visibility": 4828,
+ "wind_speed": 1,
+ "wind_deg": 40,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10n"
+ },
+ {
+ "id": 701,
+ "main": "Mist",
+ "description": "mist",
+ "icon": "50n"
+ }
+ ],
+ "rain": {
+ "1h": 0.65
+ }
+ },
+ "hourly": [
+ {
+ "dt": 1603152000,
+ "temp": -8.91,
+ "feels_like": 7.95,
+ "pressure": 1025,
+ "humidity": 100,
+ "dew_point": 8.91,
+ "clouds": 90,
+ "visibility": 10000,
+ "wind_speed": 1.03,
+ "wind_deg": 32,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 0.4
+ }
+ },
+ {
+ "dt": 1603155600,
+ "temp": -9.16,
+ "feels_like": 7.7,
+ "pressure": 1025,
+ "humidity": 91,
+ "dew_point": 7.77,
+ "clouds": 95,
+ "visibility": 10000,
+ "wind_speed": 1.34,
+ "wind_deg": 67,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 0.29,
+ "rain": {
+ "1h": 0.87
+ }
+ },
+ {
+ "dt": 1603159200,
+ "temp": -9.24,
+ "feels_like": 7.7,
+ "pressure": 1024,
+ "humidity": 88,
+ "dew_point": 7.36,
+ "clouds": 98,
+ "visibility": 10000,
+ "wind_speed": 1.32,
+ "wind_deg": 48,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 0.59,
+ "rain": {
+ "1h": 0.42
+ }
+ },
+ {
+ "dt": 1603162800,
+ "temp": -9.18,
+ "feels_like": 6.91,
+ "pressure": 1023,
+ "humidity": 86,
+ "dew_point": 6.96,
+ "clouds": 99,
+ "visibility": 10000,
+ "wind_speed": 2.23,
+ "wind_deg": 42,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0.86
+ },
+ {
+ "dt": 1603166400,
+ "temp": -9.09,
+ "feels_like": 6.46,
+ "pressure": 1023,
+ "humidity": 88,
+ "dew_point": 7.21,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 2.83,
+ "wind_deg": 46,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 0.94,
+ "rain": {
+ "1h": 0.6
+ }
+ },
+ {
+ "dt": 1603170000,
+ "temp": -8.96,
+ "feels_like": 6.43,
+ "pressure": 1022,
+ "humidity": 91,
+ "dew_point": 7.62,
+ "clouds": 100,
+ "visibility": 5405,
+ "wind_speed": 2.81,
+ "wind_deg": 18,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 1.89
+ }
+ },
+ {
+ "dt": 1603173600,
+ "temp": -8.84,
+ "feels_like": 6.29,
+ "pressure": 1021,
+ "humidity": 91,
+ "dew_point": 7.6,
+ "clouds": 100,
+ "visibility": 7599,
+ "wind_speed": 2.8,
+ "wind_deg": 35,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 2.07
+ }
+ },
+ {
+ "dt": 1603177200,
+ "temp": -8.92,
+ "feels_like": 6.34,
+ "pressure": 1021,
+ "humidity": 92,
+ "dew_point": 7.78,
+ "clouds": 100,
+ "visibility": 8594,
+ "wind_speed": 2.91,
+ "wind_deg": 44,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 1.19
+ }
+ },
+ {
+ "dt": 1603180800,
+ "temp": -9.08,
+ "feels_like": 7.18,
+ "pressure": 1020,
+ "humidity": 93,
+ "dew_point": 8.06,
+ "clouds": 100,
+ "visibility": 9347,
+ "wind_speed": 2.06,
+ "wind_deg": 37,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 1.02
+ }
+ },
+ {
+ "dt": 1603184400,
+ "temp": -8.98,
+ "feels_like": 6.28,
+ "pressure": 1019,
+ "humidity": 93,
+ "dew_point": 8,
+ "clouds": 100,
+ "visibility": 6164,
+ "wind_speed": 3.16,
+ "wind_deg": 354,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 1.89
+ }
+ },
+ {
+ "dt": 1603188000,
+ "temp": -8.69,
+ "feels_like": 5.78,
+ "pressure": 1019,
+ "humidity": 92,
+ "dew_point": 7.58,
+ "clouds": 100,
+ "visibility": 5143,
+ "wind_speed": 3.31,
+ "wind_deg": 29,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 2.6
+ }
+ },
+ {
+ "dt": 1603191600,
+ "temp": -8.6,
+ "feels_like": 6.08,
+ "pressure": 1019,
+ "humidity": 92,
+ "dew_point": 7.42,
+ "clouds": 100,
+ "visibility": 6072,
+ "wind_speed": 2.73,
+ "wind_deg": 29,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 2.3
+ }
+ },
+ {
+ "dt": 1603195200,
+ "temp": -8.56,
+ "feels_like": 6.68,
+ "pressure": 1019,
+ "humidity": 92,
+ "dew_point": 7.45,
+ "clouds": 100,
+ "visibility": 6697,
+ "wind_speed": 1.8,
+ "wind_deg": 16,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 2.58
+ }
+ },
+ {
+ "dt": 1603198800,
+ "temp": -8.74,
+ "feels_like": 6.88,
+ "pressure": 1020,
+ "humidity": 91,
+ "dew_point": 7.38,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 1.77,
+ "wind_deg": 319,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 1.06
+ }
+ },
+ {
+ "dt": 1603202400,
+ "temp": -8.93,
+ "feels_like": 7.32,
+ "pressure": 1020,
+ "humidity": 90,
+ "dew_point": 7.48,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 1.42,
+ "wind_deg": 291,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 0.95
+ }
+ },
+ {
+ "dt": 1603206000,
+ "temp": -9.07,
+ "feels_like": 6.75,
+ "pressure": 1021,
+ "humidity": 89,
+ "dew_point": 7.43,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 2.43,
+ "wind_deg": 276,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 0.31
+ }
+ },
+ {
+ "dt": 1603209600,
+ "temp": -9.31,
+ "feels_like": 6.58,
+ "pressure": 1022,
+ "humidity": 86,
+ "dew_point": 7.17,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 2.93,
+ "wind_deg": 262,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04d"
+ }
+ ],
+ "pop": 0.8
+ },
+ {
+ "dt": 1603213200,
+ "temp": -10.07,
+ "feels_like": 6.68,
+ "pressure": 1023,
+ "humidity": 80,
+ "dew_point": 6.78,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 3.77,
+ "wind_deg": 269,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04d"
+ }
+ ],
+ "pop": 0.8
+ },
+ {
+ "dt": 1603216800,
+ "temp": -11.87,
+ "feels_like": 7.99,
+ "pressure": 1023,
+ "humidity": 67,
+ "dew_point": 6.15,
+ "clouds": 99,
+ "visibility": 10000,
+ "wind_speed": 4.21,
+ "wind_deg": 265,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04d"
+ }
+ ],
+ "pop": 0.8
+ },
+ {
+ "dt": 1603220400,
+ "temp": -12.05,
+ "feels_like": 7.95,
+ "pressure": 1024,
+ "humidity": 64,
+ "dew_point": 5.63,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 4.38,
+ "wind_deg": 270,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04d"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603224000,
+ "temp": -11.74,
+ "feels_like": 7.54,
+ "pressure": 1025,
+ "humidity": 63,
+ "dew_point": 5.08,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 4.38,
+ "wind_deg": 276,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04d"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603227600,
+ "temp": -11.09,
+ "feels_like": 7.13,
+ "pressure": 1026,
+ "humidity": 62,
+ "dew_point": 4.24,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 3.79,
+ "wind_deg": 293,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04d"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603231200,
+ "temp": -10.13,
+ "feels_like": 6.51,
+ "pressure": 1027,
+ "humidity": 63,
+ "dew_point": 3.43,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 3.13,
+ "wind_deg": 318,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603234800,
+ "temp": -9.53,
+ "feels_like": 7.02,
+ "pressure": 1028,
+ "humidity": 63,
+ "dew_point": 3.02,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 1.4,
+ "wind_deg": 329,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603238400,
+ "temp": -9.2,
+ "feels_like": 7.3,
+ "pressure": 1028,
+ "humidity": 65,
+ "dew_point": 3.03,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 0.56,
+ "wind_deg": 52,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603242000,
+ "temp": -8.73,
+ "feels_like": 6.57,
+ "pressure": 1029,
+ "humidity": 68,
+ "dew_point": 3.28,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 0.98,
+ "wind_deg": 75,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603245600,
+ "temp": -8.12,
+ "feels_like": 5.55,
+ "pressure": 1029,
+ "humidity": 71,
+ "dew_point": 3.27,
+ "clouds": 89,
+ "visibility": 10000,
+ "wind_speed": 1.57,
+ "wind_deg": 68,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603249200,
+ "temp": -7.83,
+ "feels_like": 4.86,
+ "pressure": 1029,
+ "humidity": 71,
+ "dew_point": 3.05,
+ "clouds": 93,
+ "visibility": 10000,
+ "wind_speed": 2.07,
+ "wind_deg": 68,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603252800,
+ "temp": -7.49,
+ "feels_like": 4.21,
+ "pressure": 1029,
+ "humidity": 72,
+ "dew_point": 2.8,
+ "clouds": 94,
+ "visibility": 10000,
+ "wind_speed": 2.48,
+ "wind_deg": 66,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603256400,
+ "temp": -6.92,
+ "feels_like": 3.31,
+ "pressure": 1029,
+ "humidity": 73,
+ "dew_point": 2.47,
+ "clouds": 96,
+ "visibility": 10000,
+ "wind_speed": 2.87,
+ "wind_deg": 81,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603260000,
+ "temp": -6.49,
+ "feels_like": 2.48,
+ "pressure": 1029,
+ "humidity": 74,
+ "dew_point": 2.22,
+ "clouds": 96,
+ "visibility": 10000,
+ "wind_speed": 3.38,
+ "wind_deg": 78,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603263600,
+ "temp": -6.3,
+ "feels_like": 1.81,
+ "pressure": 1028,
+ "humidity": 71,
+ "dew_point": 1.55,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 3.89,
+ "wind_deg": 84,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603267200,
+ "temp": -6.22,
+ "feels_like": 1.39,
+ "pressure": 1027,
+ "humidity": 69,
+ "dew_point": 0.99,
+ "clouds": 98,
+ "visibility": 10000,
+ "wind_speed": 4.27,
+ "wind_deg": 74,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0
+ },
+ {
+ "dt": 1603270800,
+ "temp": -6.69,
+ "feels_like": 1.66,
+ "pressure": 1026,
+ "humidity": 65,
+ "dew_point": 0.79,
+ "clouds": 96,
+ "visibility": 10000,
+ "wind_speed": 4.47,
+ "wind_deg": 69,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0.05
+ },
+ {
+ "dt": 1603274400,
+ "temp": -6.53,
+ "feels_like": 1.74,
+ "pressure": 1024,
+ "humidity": 68,
+ "dew_point": 1.07,
+ "clouds": 97,
+ "visibility": 10000,
+ "wind_speed": 4.23,
+ "wind_deg": 65,
+ "weather": [
+ {
+ "id": 804,
+ "main": "Clouds",
+ "description": "overcast clouds",
+ "icon": "04n"
+ }
+ ],
+ "pop": 0.28
+ },
+ {
+ "dt": 1603278000,
+ "temp": -6.41,
+ "feels_like": 1.87,
+ "pressure": 1023,
+ "humidity": 73,
+ "dew_point": 1.96,
+ "clouds": 97,
+ "visibility": 10000,
+ "wind_speed": 4.08,
+ "wind_deg": 73,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 0.35,
+ "rain": {
+ "1h": 0.17
+ }
+ },
+ {
+ "dt": 1603281600,
+ "temp": -6.42,
+ "feels_like": 2.71,
+ "pressure": 1022,
+ "humidity": 79,
+ "dew_point": 3.21,
+ "clouds": 98,
+ "visibility": 9620,
+ "wind_speed": 3.16,
+ "wind_deg": 71,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 0.62,
+ "rain": {
+ "1h": 0.37
+ }
+ },
+ {
+ "dt": 1603285200,
+ "temp": -6.67,
+ "feels_like": 3.38,
+ "pressure": 1021,
+ "humidity": 86,
+ "dew_point": 4.59,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 2.95,
+ "wind_deg": 84,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 0.9,
+ "rain": {
+ "1h": 1.08
+ }
+ },
+ {
+ "dt": 1603288800,
+ "temp": -8.55,
+ "feels_like": 5.61,
+ "pressure": 1019,
+ "humidity": 87,
+ "dew_point": 6.64,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 3.05,
+ "wind_deg": 135,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 0.23
+ }
+ },
+ {
+ "dt": 1603292400,
+ "temp": -10.85,
+ "feels_like": 8.09,
+ "pressure": 1018,
+ "humidity": 95,
+ "dew_point": 10.13,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 4.04,
+ "wind_deg": 150,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 0.31
+ }
+ },
+ {
+ "dt": 1603296000,
+ "temp": -13.37,
+ "feels_like": 10.29,
+ "pressure": 1017,
+ "humidity": 90,
+ "dew_point": 11.93,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 5.19,
+ "wind_deg": 170,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 0.32
+ }
+ },
+ {
+ "dt": 1603299600,
+ "temp": -13.92,
+ "feels_like": 11.34,
+ "pressure": 1015,
+ "humidity": 94,
+ "dew_point": 13.07,
+ "clouds": 100,
+ "visibility": 6450,
+ "wind_speed": 5.01,
+ "wind_deg": 177,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 3.08
+ }
+ },
+ {
+ "dt": 1603303200,
+ "temp": -14.85,
+ "feels_like": 12.78,
+ "pressure": 1014,
+ "humidity": 95,
+ "dew_point": 14.1,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 4.79,
+ "wind_deg": 183,
+ "weather": [
+ {
+ "id": 502,
+ "main": "Rain",
+ "description": "heavy intensity rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 4.94
+ }
+ },
+ {
+ "dt": 1603306800,
+ "temp": -15.94,
+ "feels_like": 13.56,
+ "pressure": 1014,
+ "humidity": 93,
+ "dew_point": 14.96,
+ "clouds": 100,
+ "visibility": 7138,
+ "wind_speed": 5.61,
+ "wind_deg": 207,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 2.71
+ }
+ },
+ {
+ "dt": 1603310400,
+ "temp": -16.72,
+ "feels_like": 14.6,
+ "pressure": 1014,
+ "humidity": 93,
+ "dew_point": 15.66,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 5.64,
+ "wind_deg": 208,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 1.33
+ }
+ },
+ {
+ "dt": 1603314000,
+ "temp": -16.74,
+ "feels_like": 14.61,
+ "pressure": 1014,
+ "humidity": 94,
+ "dew_point": 15.81,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 5.75,
+ "wind_deg": 216,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10d"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 0.89
+ }
+ },
+ {
+ "dt": 1603317600,
+ "temp": -17.05,
+ "feels_like": 14.53,
+ "pressure": 1015,
+ "humidity": 92,
+ "dew_point": 15.83,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 6.3,
+ "wind_deg": 234,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 0.51
+ }
+ },
+ {
+ "dt": 1603321200,
+ "temp": -16.74,
+ "feels_like": 14.18,
+ "pressure": 1016,
+ "humidity": 87,
+ "dew_point": 14.65,
+ "clouds": 100,
+ "visibility": 10000,
+ "wind_speed": 5.74,
+ "wind_deg": 257,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10n"
+ }
+ ],
+ "pop": 1,
+ "rain": {
+ "1h": 0.22
+ }
+ }
+ ],
+ "daily": [
+ {
+ "dt": 1603123200,
+ "sunrise": 1603106181,
+ "sunset": 1603144896,
+ "temp": {
+ "day": 12,
+ "min": 8.91,
+ "max": 12.73,
+ "night": 9.05,
+ "eve": 9.72,
+ "morn": 12.73
+ },
+ "feels_like": {
+ "day": 9.92,
+ "night": 7.02,
+ "eve": 7.88,
+ "morn": 8.02
+ },
+ "pressure": 1025,
+ "humidity": 78,
+ "dew_point": 8.34,
+ "wind_speed": 2.41,
+ "wind_deg": 242,
+ "weather": [
+ {
+ "id": 501,
+ "main": "Rain",
+ "description": "moderate rain",
+ "icon": "10d"
+ }
+ ],
+ "clouds": 100,
+ "pop": 1,
+ "rain": 8.77,
+ "uvi": 2.37
+ },
+ {
+ "dt": 1603209600,
+ "sunrise": 1603192663,
+ "sunset": 1603231195,
+ "temp": {
+ "day": 9.07,
+ "min": 7.83,
+ "max": 11.87,
+ "night": 7.83,
+ "eve": 11.09,
+ "morn": 8.98
+ },
+ "feels_like": {
+ "day": 6.75,
+ "night": 4.86,
+ "eve": 7.13,
+ "morn": 6.28
+ },
+ "pressure": 1021,
+ "humidity": 89,
+ "dew_point": 7.43,
+ "wind_speed": 2.43,
+ "wind_deg": 276,
+ "weather": [
+ {
+ "id": 502,
+ "main": "Rain",
+ "description": "heavy intensity rain",
+ "icon": "10d"
+ }
+ ],
+ "clouds": 100,
+ "pop": 1,
+ "rain": 18.46,
+ "uvi": 2.3
+ },
+ {
+ "dt": 1603296000,
+ "sunrise": 1603279145,
+ "sunset": 1603317495,
+ "temp": {
+ "day": 10.85,
+ "min": 6.42,
+ "max": 16.74,
+ "night": 12.25,
+ "eve": 16.74,
+ "morn": 6.69
+ },
+ "feels_like": {
+ "day": 8.09,
+ "night": 8.59,
+ "eve": 14.61,
+ "morn": 1.66
+ },
+ "pressure": 1018,
+ "humidity": 95,
+ "dew_point": 10.13,
+ "wind_speed": 4.04,
+ "wind_deg": 150,
+ "weather": [
+ {
+ "id": 502,
+ "main": "Rain",
+ "description": "heavy intensity rain",
+ "icon": "10d"
+ }
+ ],
+ "clouds": 100,
+ "pop": 1,
+ "rain": 16.19,
+ "uvi": 2.32
+ },
+ {
+ "dt": 1603382400,
+ "sunrise": 1603365627,
+ "sunset": 1603403795,
+ "temp": {
+ "day": 9.95,
+ "min": 7.29,
+ "max": 11.27,
+ "night": 7.29,
+ "eve": 11.01,
+ "morn": 9.44
+ },
+ "feels_like": {
+ "day": 5.45,
+ "night": 2.63,
+ "eve": 8.07,
+ "morn": 5.65
+ },
+ "pressure": 1027,
+ "humidity": 57,
+ "dew_point": 2.03,
+ "wind_speed": 4,
+ "wind_deg": 283,
+ "weather": [
+ {
+ "id": 802,
+ "main": "Clouds",
+ "description": "scattered clouds",
+ "icon": "03d"
+ }
+ ],
+ "clouds": 27,
+ "pop": 0,
+ "uvi": 2.36
+ },
+ {
+ "dt": 1603468800,
+ "sunrise": 1603452109,
+ "sunset": 1603490097,
+ "temp": {
+ "day": 12.02,
+ "min": 6.62,
+ "max": 17.04,
+ "night": 15.91,
+ "eve": 17.04,
+ "morn": 7.09
+ },
+ "feels_like": {
+ "day": 8.48,
+ "night": 11.82,
+ "eve": 12.58,
+ "morn": 3.07
+ },
+ "pressure": 1022,
+ "humidity": 72,
+ "dew_point": 7.29,
+ "wind_speed": 4.1,
+ "wind_deg": 147,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10d"
+ }
+ ],
+ "clouds": 99,
+ "pop": 0.29,
+ "rain": 0.22,
+ "uvi": 2.2
+ },
+ {
+ "dt": 1603555200,
+ "sunrise": 1603538592,
+ "sunset": 1603576400,
+ "temp": {
+ "day": 8.39,
+ "min": 6.83,
+ "max": 15.86,
+ "night": 6.83,
+ "eve": 9.56,
+ "morn": 12.99
+ },
+ "feels_like": {
+ "day": 3.79,
+ "night": 3.04,
+ "eve": 6.58,
+ "morn": 10.39
+ },
+ "pressure": 1022,
+ "humidity": 58,
+ "dew_point": 0.71,
+ "wind_speed": 3.87,
+ "wind_deg": 10,
+ "weather": [
+ {
+ "id": 500,
+ "main": "Rain",
+ "description": "light rain",
+ "icon": "10d"
+ }
+ ],
+ "clouds": 72,
+ "pop": 0.9,
+ "rain": 2.54,
+ "uvi": 2.07
+ },
+ {
+ "dt": 1603641600,
+ "sunrise": 1603625075,
+ "sunset": 1603662705,
+ "temp": {
+ "day": 5.33,
+ "min": 3.23,
+ "max": 7.24,
+ "night": 4.97,
+ "eve": 6.59,
+ "morn": 3.97
+ },
+ "feels_like": {
+ "day": 1.26,
+ "night": 0.02,
+ "eve": 2.58,
+ "morn": -0.34
+ },
+ "pressure": 1025,
+ "humidity": 61,
+ "dew_point": -5.56,
+ "wind_speed": 2.67,
+ "wind_deg": 37,
+ "weather": [
+ {
+ "id": 803,
+ "main": "Clouds",
+ "description": "broken clouds",
+ "icon": "04d"
+ }
+ ],
+ "clouds": 74,
+ "pop": 0.08,
+ "uvi": 2.25
+ },
+ {
+ "dt": 1603728000,
+ "sunrise": 1603711558,
+ "sunset": 1603749010,
+ "temp": {
+ "day": 3.7,
+ "min": 2.09,
+ "max": 3.88,
+ "night": 3.54,
+ "eve": 3.54,
+ "morn": 2.09
+ },
+ "feels_like": {
+ "day": -0.28,
+ "night": -0.76,
+ "eve": -0.86,
+ "morn": -2.81
+ },
+ "pressure": 1021,
+ "humidity": 90,
+ "dew_point": 2.33,
+ "wind_speed": 3.35,
+ "wind_deg": 32,
+ "weather": [
+ {
+ "id": 502,
+ "main": "Rain",
+ "description": "heavy intensity rain",
+ "icon": "10d"
+ }
+ ],
+ "clouds": 100,
+ "pop": 1,
+ "rain": 12.43
+ }
+ ]
+} \ No newline at end of file
diff --git a/weather-widget/negative.png b/weather-widget/negative.png
new file mode 100644
index 0000000..afcf567
--- /dev/null
+++ b/weather-widget/negative.png
Binary files differ
diff --git a/weather-widget/screenshots/weather-widget.png b/weather-widget/screenshots/weather-widget.png
deleted file mode 100644
index c7fc37e..0000000
--- a/weather-widget/screenshots/weather-widget.png
+++ /dev/null
Binary files differ
diff --git a/weather-widget/weather-widget.png b/weather-widget/weather-widget.png
index 177b350..c7fc37e 100644
--- a/weather-widget/weather-widget.png
+++ b/weather-widget/weather-widget.png
Binary files differ
diff --git a/weather-widget/weather.json b/weather-widget/weather.json
deleted file mode 100644
index 4a18714..0000000
--- a/weather-widget/weather.json
+++ /dev/null
@@ -1,1224 +0,0 @@
-{
- "lat": 33.44,
- "lon": -94.04,
- "timezone": "America/Chicago",
- "timezone_offset": -18000,
- "current": {
- "dt": 1594490161,
- "sunrise": 1594466108,
- "sunset": 1594517275,
- "temp": 32.69,
- "feels_like": 36.81,
- "pressure": 1017,
- "humidity": 59,
- "dew_point": 23.63,
- "uvi": 7.94,
- "clouds": 40,
- "visibility": 16093,
- "wind_speed": 2.1,
- "wind_deg": 250,
- "weather": [
- {
- "id": 802,
- "main": "Clear Sky",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- "hourly": [
- {
- "dt": 1594486800,
- "temp": 32.69,
- "feels_like": 36.4,
- "pressure": 1017,
- "humidity": 59,
- "dew_point": 23.63,
- "clouds": 40,
- "wind_speed": 2.68,
- "wind_deg": 242,
- "weather": [
- {
- "id": 802,
- "main": "Clouds",
- "description": "scattered clouds",
- "icon": "03d"
- }
- ]
- },
- {
- "dt": 1594490400,
- "temp": 33.38,
- "feels_like": 37.27,
- "pressure": 1017,
- "humidity": 59,
- "dew_point": 24.27,
- "clouds": 21,
- "wind_speed": 2.97,
- "wind_deg": 248,
- "weather": [
- {
- "id": 801,
- "main": "Clouds",
- "description": "few clouds",
- "icon": "02d"
- }
- ]
- },
- {
- "dt": 1594494000,
- "temp": 34.44,
- "feels_like": 38.38,
- "pressure": 1015,
- "humidity": 55,
- "dew_point": 24.09,
- "clouds": 28,
- "wind_speed": 2.74,
- "wind_deg": 254,
- "weather": [
- {
- "id": 802,
- "main": "Clouds",
- "description": "scattered clouds",
- "icon": "03d"
- }
- ]
- },
- {
- "dt": 1594497600,
- "temp": 35.32,
- "feels_like": 39.58,
- "pressure": 1014,
- "humidity": 53,
- "dew_point": 24.28,
- "clouds": 18,
- "wind_speed": 2.45,
- "wind_deg": 260,
- "weather": [
- {
- "id": 801,
- "main": "Clouds",
- "description": "few clouds",
- "icon": "02d"
- }
- ]
- },
- {
- "dt": 1594501200,
- "temp": 35.57,
- "feels_like": 39.73,
- "pressure": 1013,
- "humidity": 52,
- "dew_point": 24.19,
- "clouds": 16,
- "wind_speed": 2.52,
- "wind_deg": 259,
- "weather": [
- {
- "id": 801,
- "main": "Clouds",
- "description": "few clouds",
- "icon": "02d"
- }
- ]
- },
- {
- "dt": 1594504800,
- "temp": 35.34,
- "feels_like": 39.82,
- "pressure": 1012,
- "humidity": 55,
- "dew_point": 25.07,
- "clouds": 13,
- "wind_speed": 2.68,
- "wind_deg": 256,
- "weather": [
- {
- "id": 801,
- "main": "Clouds",
- "description": "few clouds",
- "icon": "02d"
- }
- ]
- },
- {
- "dt": 1594508400,
- "temp": 34.85,
- "feels_like": 40.34,
- "pressure": 1012,
- "humidity": 61,
- "dew_point": 26.36,
- "clouds": 10,
- "wind_speed": 2.42,
- "wind_deg": 249,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- {
- "dt": 1594512000,
- "temp": 33.39,
- "feels_like": 39.08,
- "pressure": 1012,
- "humidity": 67,
- "dew_point": 26.53,
- "clouds": 9,
- "wind_speed": 2.34,
- "wind_deg": 246,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- {
- "dt": 1594515600,
- "temp": 30.82,
- "feels_like": 35.85,
- "pressure": 1012,
- "humidity": 73,
- "dew_point": 25.61,
- "clouds": 0,
- "wind_speed": 2.35,
- "wind_deg": 240,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- {
- "dt": 1594519200,
- "temp": 29.56,
- "feels_like": 33.64,
- "pressure": 1012,
- "humidity": 73,
- "dew_point": 24.34,
- "clouds": 0,
- "wind_speed": 2.65,
- "wind_deg": 227,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594522800,
- "temp": 28.72,
- "feels_like": 32.55,
- "pressure": 1012,
- "humidity": 75,
- "dew_point": 23.97,
- "clouds": 0,
- "wind_speed": 2.7,
- "wind_deg": 223,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594526400,
- "temp": 27.79,
- "feels_like": 31.42,
- "pressure": 1012,
- "humidity": 77,
- "dew_point": 23.56,
- "clouds": 0,
- "wind_speed": 2.61,
- "wind_deg": 211,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594530000,
- "temp": 27.27,
- "feels_like": 30.91,
- "pressure": 1012,
- "humidity": 79,
- "dew_point": 23.39,
- "clouds": 0,
- "wind_speed": 2.54,
- "wind_deg": 226,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594533600,
- "temp": 27.17,
- "feels_like": 30.72,
- "pressure": 1012,
- "humidity": 79,
- "dew_point": 23.23,
- "clouds": 0,
- "wind_speed": 2.58,
- "wind_deg": 213,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594537200,
- "temp": 26.91,
- "feels_like": 30.06,
- "pressure": 1012,
- "humidity": 78,
- "dew_point": 22.95,
- "clouds": 0,
- "wind_speed": 2.79,
- "wind_deg": 225,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594540800,
- "temp": 26.57,
- "feels_like": 29.76,
- "pressure": 1011,
- "humidity": 79,
- "dew_point": 22.68,
- "clouds": 33,
- "wind_speed": 2.63,
- "wind_deg": 217,
- "weather": [
- {
- "id": 802,
- "main": "Clouds",
- "description": "scattered clouds",
- "icon": "03n"
- }
- ]
- },
- {
- "dt": 1594544400,
- "temp": 26.39,
- "feels_like": 28.98,
- "pressure": 1011,
- "humidity": 78,
- "dew_point": 22.36,
- "clouds": 56,
- "wind_speed": 3.19,
- "wind_deg": 191,
- "weather": [
- {
- "id": 803,
- "main": "Clouds",
- "description": "broken clouds",
- "icon": "04n"
- }
- ]
- },
- {
- "dt": 1594548000,
- "temp": 25.97,
- "feels_like": 29.15,
- "pressure": 1011,
- "humidity": 79,
- "dew_point": 22.12,
- "clouds": 67,
- "wind_speed": 2.2,
- "wind_deg": 211,
- "weather": [
- {
- "id": 803,
- "main": "Clouds",
- "description": "broken clouds",
- "icon": "04n"
- }
- ]
- },
- {
- "dt": 1594551600,
- "temp": 25.6,
- "feels_like": 28.65,
- "pressure": 1012,
- "humidity": 79,
- "dew_point": 21.77,
- "clouds": 72,
- "wind_speed": 2.12,
- "wind_deg": 257,
- "weather": [
- {
- "id": 803,
- "main": "Clouds",
- "description": "broken clouds",
- "icon": "04n"
- }
- ]
- },
- {
- "dt": 1594555200,
- "temp": 25.25,
- "feels_like": 29.31,
- "pressure": 1012,
- "humidity": 84,
- "dew_point": 22.42,
- "clouds": 74,
- "wind_speed": 1.18,
- "wind_deg": 276,
- "weather": [
- {
- "id": 500,
- "main": "Rain",
- "description": "light rain",
- "icon": "10d"
- }
- ],
- "rain": {
- "1h": 0.66
- }
- },
- {
- "dt": 1594558800,
- "temp": 26.51,
- "feels_like": 31.02,
- "pressure": 1013,
- "humidity": 82,
- "dew_point": 23.22,
- "clouds": 91,
- "wind_speed": 1.19,
- "wind_deg": 227,
- "weather": [
- {
- "id": 500,
- "main": "Rain",
- "description": "light rain",
- "icon": "10d"
- }
- ],
- "rain": {
- "1h": 0.5
- }
- },
- {
- "dt": 1594562400,
- "temp": 27.99,
- "feels_like": 31.34,
- "pressure": 1012,
- "humidity": 75,
- "dew_point": 23.26,
- "clouds": 87,
- "wind_speed": 2.82,
- "wind_deg": 223,
- "weather": [
- {
- "id": 804,
- "main": "Clouds",
- "description": "overcast clouds",
- "icon": "04d"
- }
- ]
- },
- {
- "dt": 1594566000,
- "temp": 29.6,
- "feels_like": 32.28,
- "pressure": 1012,
- "humidity": 67,
- "dew_point": 23.02,
- "clouds": 63,
- "wind_speed": 3.51,
- "wind_deg": 236,
- "weather": [
- {
- "id": 803,
- "main": "Clouds",
- "description": "broken clouds",
- "icon": "04d"
- }
- ]
- },
- {
- "dt": 1594569600,
- "temp": 31.12,
- "feels_like": 33.49,
- "pressure": 1011,
- "humidity": 62,
- "dew_point": 23.22,
- "clouds": 52,
- "wind_speed": 4.08,
- "wind_deg": 239,
- "weather": [
- {
- "id": 803,
- "main": "Clouds",
- "description": "broken clouds",
- "icon": "04d"
- }
- ]
- },
- {
- "dt": 1594573200,
- "temp": 32.66,
- "feels_like": 35.05,
- "pressure": 1011,
- "humidity": 58,
- "dew_point": 23.6,
- "clouds": 46,
- "wind_speed": 4.31,
- "wind_deg": 238,
- "weather": [
- {
- "id": 802,
- "main": "Clouds",
- "description": "scattered clouds",
- "icon": "03d"
- }
- ]
- },
- {
- "dt": 1594576800,
- "temp": 34.15,
- "feels_like": 36.59,
- "pressure": 1011,
- "humidity": 54,
- "dew_point": 23.74,
- "clouds": 40,
- "wind_speed": 4.4,
- "wind_deg": 236,
- "weather": [
- {
- "id": 802,
- "main": "Clouds",
- "description": "scattered clouds",
- "icon": "03d"
- }
- ]
- },
- {
- "dt": 1594580400,
- "temp": 35.24,
- "feels_like": 37.8,
- "pressure": 1010,
- "humidity": 51,
- "dew_point": 23.83,
- "clouds": 0,
- "wind_speed": 4.27,
- "wind_deg": 246,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- {
- "dt": 1594584000,
- "temp": 35.73,
- "feels_like": 38.39,
- "pressure": 1009,
- "humidity": 50,
- "dew_point": 23.92,
- "clouds": 0,
- "wind_speed": 4.23,
- "wind_deg": 262,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- {
- "dt": 1594587600,
- "temp": 35.89,
- "feels_like": 38.87,
- "pressure": 1008,
- "humidity": 51,
- "dew_point": 24.29,
- "clouds": 0,
- "wind_speed": 4.17,
- "wind_deg": 267,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- {
- "dt": 1594591200,
- "temp": 35.63,
- "feels_like": 39.46,
- "pressure": 1008,
- "humidity": 55,
- "dew_point": 25.31,
- "clouds": 0,
- "wind_speed": 3.85,
- "wind_deg": 266,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- {
- "dt": 1594594800,
- "temp": 35,
- "feels_like": 39.97,
- "pressure": 1007,
- "humidity": 61,
- "dew_point": 26.37,
- "clouds": 0,
- "wind_speed": 3.3,
- "wind_deg": 262,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- {
- "dt": 1594598400,
- "temp": 33.25,
- "feels_like": 38.23,
- "pressure": 1007,
- "humidity": 66,
- "dew_point": 26.08,
- "clouds": 0,
- "wind_speed": 2.98,
- "wind_deg": 259,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- {
- "dt": 1594602000,
- "temp": 30.86,
- "feels_like": 35.71,
- "pressure": 1008,
- "humidity": 72,
- "dew_point": 25.37,
- "clouds": 0,
- "wind_speed": 2.44,
- "wind_deg": 254,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ]
- },
- {
- "dt": 1594605600,
- "temp": 29.71,
- "feels_like": 34.14,
- "pressure": 1008,
- "humidity": 72,
- "dew_point": 24.24,
- "clouds": 0,
- "wind_speed": 2.07,
- "wind_deg": 246,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594609200,
- "temp": 29.09,
- "feels_like": 33.6,
- "pressure": 1009,
- "humidity": 73,
- "dew_point": 23.92,
- "clouds": 0,
- "wind_speed": 1.65,
- "wind_deg": 239,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594612800,
- "temp": 28.41,
- "feels_like": 33.33,
- "pressure": 1009,
- "humidity": 75,
- "dew_point": 23.77,
- "clouds": 0,
- "wind_speed": 0.9,
- "wind_deg": 301,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594616400,
- "temp": 27.65,
- "feels_like": 31.94,
- "pressure": 1010,
- "humidity": 79,
- "dew_point": 23.7,
- "clouds": 0,
- "wind_speed": 1.9,
- "wind_deg": 342,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594620000,
- "temp": 26.81,
- "feels_like": 30.18,
- "pressure": 1010,
- "humidity": 78,
- "dew_point": 22.81,
- "clouds": 0,
- "wind_speed": 2.39,
- "wind_deg": 13,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594623600,
- "temp": 25.86,
- "feels_like": 28.37,
- "pressure": 1010,
- "humidity": 75,
- "dew_point": 21.3,
- "clouds": 0,
- "wind_speed": 2.45,
- "wind_deg": 41,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594627200,
- "temp": 24.94,
- "feels_like": 26.96,
- "pressure": 1010,
- "humidity": 75,
- "dew_point": 20.36,
- "clouds": 0,
- "wind_speed": 2.53,
- "wind_deg": 49,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594630800,
- "temp": 23.94,
- "feels_like": 25.44,
- "pressure": 1010,
- "humidity": 78,
- "dew_point": 19.9,
- "clouds": 2,
- "wind_speed": 3.05,
- "wind_deg": 56,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01n"
- }
- ]
- },
- {
- "dt": 1594634400,
- "temp": 23.22,
- "feels_like": 25.05,
- "pressure": 1011,
- "humidity": 81,
- "dew_point": 19.94,
- "clouds": 14,
- "wind_speed": 2.51,
- "wind_deg": 65,
- "weather": [
- {
- "id": 801,
- "main": "Clouds",
- "description": "few clouds",
- "icon": "02n"
- }
- ]
- },
- {
- "dt": 1594638000,
- "temp": 22.87,
- "feels_like": 24.56,
- "pressure": 1011,
- "humidity": 81,
- "dew_point": 19.61,
- "clouds": 17,
- "wind_speed": 2.48,
- "wind_deg": 74,
- "weather": [
- {
- "id": 801,
- "main": "Clouds",
- "description": "few clouds",
- "icon": "02n"
- }
- ]
- },
- {
- "dt": 1594641600,
- "temp": 22.82,
- "feels_like": 24.7,
- "pressure": 1012,
- "humidity": 83,
- "dew_point": 19.8,
- "clouds": 29,
- "wind_speed": 2.44,
- "wind_deg": 63,
- "weather": [
- {
- "id": 802,
- "main": "Clouds",
- "description": "scattered clouds",
- "icon": "03d"
- }
- ]
- },
- {
- "dt": 1594645200,
- "temp": 23.84,
- "feels_like": 25.88,
- "pressure": 1013,
- "humidity": 80,
- "dew_point": 20.21,
- "clouds": 100,
- "wind_speed": 2.48,
- "wind_deg": 62,
- "weather": [
- {
- "id": 804,
- "main": "Clouds",
- "description": "overcast clouds",
- "icon": "04d"
- }
- ]
- },
- {
- "dt": 1594648800,
- "temp": 25,
- "feels_like": 27,
- "pressure": 1013,
- "humidity": 75,
- "dew_point": 20.37,
- "clouds": 100,
- "wind_speed": 2.59,
- "wind_deg": 67,
- "weather": [
- {
- "id": 804,
- "main": "Clouds",
- "description": "overcast clouds",
- "icon": "04d"
- }
- ]
- },
- {
- "dt": 1594652400,
- "temp": 26.18,
- "feels_like": 27.69,
- "pressure": 1012,
- "humidity": 73,
- "dew_point": 21.06,
- "clouds": 100,
- "wind_speed": 3.79,
- "wind_deg": 101,
- "weather": [
- {
- "id": 804,
- "main": "Clouds",
- "description": "overcast clouds",
- "icon": "04d"
- }
- ]
- },
- {
- "dt": 1594656000,
- "temp": 28.36,
- "feels_like": 30.56,
- "pressure": 1012,
- "humidity": 69,
- "dew_point": 22.32,
- "clouds": 83,
- "wind_speed": 3.66,
- "wind_deg": 128,
- "weather": [
- {
- "id": 803,
- "main": "Clouds",
- "description": "broken clouds",
- "icon": "04d"
- }
- ]
- }
- ],
- "daily": [
- {
- "dt": 1594490400,
- "sunrise": 1594466108,
- "sunset": 1594517275,
- "temp": {
- "day": 33.38,
- "min": 27.17,
- "max": 34.96,
- "night": 27.17,
- "eve": 33.35,
- "morn": 32.69
- },
- "feels_like": {
- "day": 37.27,
- "night": 30.72,
- "eve": 39.01,
- "morn": 36.67
- },
- "pressure": 1017,
- "humidity": 59,
- "dew_point": 24.27,
- "wind_speed": 2.97,
- "wind_deg": 248,
- "weather": [
- {
- "id": 801,
- "main": "Clouds",
- "description": "few clouds",
- "icon": "02d"
- }
- ],
- "clouds": 21,
- "uvi": 11.94
- },
- {
- "dt": 1594576800,
- "sunrise": 1594552543,
- "sunset": 1594603655,
- "temp": {
- "day": 34.15,
- "min": 25.25,
- "max": 35.89,
- "night": 26.81,
- "eve": 33.25,
- "morn": 25.25
- },
- "feels_like": {
- "day": 36.59,
- "night": 30.18,
- "eve": 38.23,
- "morn": 29.31
- },
- "pressure": 1011,
- "humidity": 54,
- "dew_point": 23.74,
- "wind_speed": 4.4,
- "wind_deg": 236,
- "weather": [
- {
- "id": 500,
- "main": "Rain",
- "description": "light rain",
- "icon": "10d"
- }
- ],
- "clouds": 40,
- "rain": 1.16,
- "uvi": 11.61
- },
- {
- "dt": 1594663200,
- "sunrise": 1594638978,
- "sunset": 1594690034,
- "temp": {
- "day": 29.22,
- "min": 22.82,
- "max": 29.22,
- "night": 26.71,
- "eve": 28.98,
- "morn": 22.82
- },
- "feels_like": {
- "day": 34.31,
- "night": 28.82,
- "eve": 34.45,
- "morn": 24.7
- },
- "pressure": 1012,
- "humidity": 72,
- "dew_point": 23.66,
- "wind_speed": 0.74,
- "wind_deg": 287,
- "weather": [
- {
- "id": 804,
- "main": "Clouds",
- "description": "overcast clouds",
- "icon": "04d"
- }
- ],
- "clouds": 85,
- "uvi": 12.72
- },
- {
- "dt": 1594749600,
- "sunrise": 1594725414,
- "sunset": 1594776411,
- "temp": {
- "day": 33.67,
- "min": 24.06,
- "max": 35.68,
- "night": 25.94,
- "eve": 32.24,
- "morn": 24.06
- },
- "feels_like": {
- "day": 35.84,
- "night": 27.78,
- "eve": 35.66,
- "morn": 27.28
- },
- "pressure": 1012,
- "humidity": 50,
- "dew_point": 21.95,
- "wind_speed": 3.45,
- "wind_deg": 183,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ],
- "clouds": 9,
- "uvi": 11.67
- },
- {
- "dt": 1594836000,
- "sunrise": 1594811851,
- "sunset": 1594862786,
- "temp": {
- "day": 32.79,
- "min": 24.61,
- "max": 35.24,
- "night": 26.42,
- "eve": 31.72,
- "morn": 24.61
- },
- "feels_like": {
- "day": 34.67,
- "night": 28.57,
- "eve": 35.11,
- "morn": 27.47
- },
- "pressure": 1014,
- "humidity": 53,
- "dew_point": 22.04,
- "wind_speed": 3.97,
- "wind_deg": 208,
- "weather": [
- {
- "id": 802,
- "main": "Clouds",
- "description": "scattered clouds",
- "icon": "03d"
- }
- ],
- "clouds": 35,
- "uvi": 11.55
- },
- {
- "dt": 1594922400,
- "sunrise": 1594898288,
- "sunset": 1594949160,
- "temp": {
- "day": 33.89,
- "min": 24.07,
- "max": 35.5,
- "night": 26.61,
- "eve": 32.58,
- "morn": 24.07
- },
- "feels_like": {
- "day": 35.74,
- "night": 29.39,
- "eve": 36.52,
- "morn": 27.33
- },
- "pressure": 1015,
- "humidity": 49,
- "dew_point": 22.01,
- "wind_speed": 3.81,
- "wind_deg": 225,
- "weather": [
- {
- "id": 802,
- "main": "Clouds",
- "description": "scattered clouds",
- "icon": "03d"
- }
- ],
- "clouds": 29,
- "uvi": 11.67
- },
- {
- "dt": 1595008800,
- "sunrise": 1594984726,
- "sunset": 1595035532,
- "temp": {
- "day": 34.95,
- "min": 24.45,
- "max": 36.42,
- "night": 26.97,
- "eve": 33.81,
- "morn": 24.45
- },
- "feels_like": {
- "day": 38.11,
- "night": 29.69,
- "eve": 38.22,
- "morn": 26.84
- },
- "pressure": 1016,
- "humidity": 50,
- "dew_point": 23.17,
- "wind_speed": 2.94,
- "wind_deg": 230,
- "weather": [
- {
- "id": 802,
- "main": "Clouds",
- "description": "scattered clouds",
- "icon": "03d"
- }
- ],
- "clouds": 46,
- "uvi": 11.86
- },
- {
- "dt": 1595095200,
- "sunrise": 1595071164,
- "sunset": 1595121903,
- "temp": {
- "day": 35.47,
- "min": 24.4,
- "max": 37.04,
- "night": 28.18,
- "eve": 34.23,
- "morn": 24.4
- },
- "feels_like": {
- "day": 38.15,
- "night": 30.61,
- "eve": 38.67,
- "morn": 26.95
- },
- "pressure": 1015,
- "humidity": 46,
- "dew_point": 22.36,
- "wind_speed": 2.93,
- "wind_deg": 238,
- "weather": [
- {
- "id": 800,
- "main": "Clear",
- "description": "clear sky",
- "icon": "01d"
- }
- ],
- "clouds": 2,
- "uvi": 11.67
- }
- ]
-} \ No newline at end of file
diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua
index 3d3b8e0..1465c0c 100644
--- a/weather-widget/weather.lua
+++ b/weather-widget/weather.lua
@@ -140,7 +140,7 @@ local function worker(args)
local timeout = args.timeout or 120
local owm_one_cal_api =
- ('https://api.openweathermap.org/data/2.5/onecall' ..
+ ('https://api.openweathermap.org/data/2.5/onecall' ..
'?lat=' .. coordinates[1] .. '&lon=' .. coordinates[2] .. '&appid=' .. api_key ..
'&units=' .. units .. '&exclude=minutely' ..
(show_hourly_forecast == false and ',hourly' or '') ..
@@ -325,12 +325,27 @@ local function worker(args)
self.min_value = new_min_value
end
}
+ local hourly_forecast_negative_graph = wibox.widget {
+ step_width = 12,
+ color = '#5E81AC',
+ background_color = beautiful.bg_normal,
+ forced_height = 100,
+ forced_width = 300,
+ widget = wibox.widget.graph,
+ set_max_value = function(self, new_max_value)
+ self.max_value = new_max_value
+ end,
+ set_min_value = function(self, new_min_value)
+ self.min_value = new_min_value
+ end
+ }
local hourly_forecast_widget = {
layout = wibox.layout.fixed.vertical,
update = function(self, hourly)
local hours_below = {
id = 'hours',
+ forced_width = 300,
layout = wibox.layout.flex.horizontal
}
local temp_below = {
@@ -355,37 +370,101 @@ local function worker(args)
widget = wibox.widget.textbox
})
table.insert(temp_below, wibox.widget {
- markup = '<span foreground="#2E3440">' .. string.format('%.0f', hour.temp) .. '°' .. '</span>',
+ markup = '<span >' .. string.format('%.0f', hour.temp) .. '°' .. '</span>',
align = 'center',
font = font_name .. ' 9',
widget = wibox.widget.textbox
})
end
end
- hourly_forecast_graph:set_max_value(max_temp)
- hourly_forecast_graph:set_min_value(min_temp * 0.7) -- move graph a bit up
+
+ hourly_forecast_graph:set_max_value(math.max(max_temp, math.abs(min_temp)))
+ hourly_forecast_graph:set_min_value(min_temp > 0 and min_temp * 0.7 or 0) -- move graph a bit up
+
+ hourly_forecast_negative_graph:set_max_value(math.abs(min_temp))
+ hourly_forecast_negative_graph:set_min_value(max_temp < 0 and math.abs(max_temp) * 0.7 or 0)
+
for i, value in ipairs(values) do
- hourly_forecast_graph:add_value(value)
+ print(value)
+ if value >= 0 then
+ hourly_forecast_graph:add_value(value)
+ hourly_forecast_negative_graph:add_value(0)
+ else
+ hourly_forecast_graph:add_value(0)
+ hourly_forecast_negative_graph:add_value(math.abs(value))
+ end
end
local count = #self
for i = 0, count do self[i]=nil end
- table.insert(self, wibox.widget{
- {
- hourly_forecast_graph,
- reflection = {horizontal = true},
- widget = wibox.container.mirror
- },
- {
- temp_below,
- valign = 'bottom',
- widget = wibox.container.place
- },
- id = 'graph',
- layout = wibox.layout.stack
- })
- table.insert(self, hours_below)
+ -- all temperatures are positive
+ if min_temp > 0 then
+ table.insert(self, wibox.widget{
+ {
+ hourly_forecast_graph,
+ reflection = {horizontal = true},
+ widget = wibox.container.mirror
+ },
+ {
+ temp_below,
+ valign = 'bottom',
+ widget = wibox.container.place
+ },
+ id = 'graph',
+ layout = wibox.layout.stack
+ })
+ table.insert(self, hours_below)
+
+ -- all temperatures are negative
+ elseif max_temp < 0 then
+ table.insert(self, hours_below)
+ table.insert(self, wibox.widget{
+ {
+ hourly_forecast_negative_graph,
+ reflection = {horizontal = true, vertical = true},
+ widget = wibox.container.mirror
+ },
+ {
+ temp_below,
+ valign = 'top',
+ widget = wibox.container.place
+ },
+ id = 'graph',
+ layout = wibox.layout.stack
+ })
+
+ -- there are both negative and positive temperatures
+ else
+ table.insert(self, wibox.widget{
+ {
+ hourly_forecast_graph,
+ reflection = {horizontal = true},
+ widget = wibox.container.mirror
+ },
+ {
+ temp_below,
+ valign = 'bottom',
+ widget = wibox.container.place
+ },
+ id = 'graph',
+ layout = wibox.layout.stack
+ })
+ table.insert(self, wibox.widget{
+ {
+ hourly_forecast_negative_graph,
+ reflection = {horizontal = true, vertical = true},
+ widget = wibox.container.mirror
+ },
+ {
+ hours_below,
+ valign = 'top',
+ widget = wibox.container.place
+ },
+ id = 'graph',
+ layout = wibox.layout.stack
+ })
+ end
end
}