Add weather widg
This commit is contained in:
parent
4375f08c67
commit
c3a1e46188
@ -4,6 +4,7 @@
|
|||||||
(include "yuck/panel/panel_widgs/panel_bat_ico.yuck")
|
(include "yuck/panel/panel_widgs/panel_bat_ico.yuck")
|
||||||
(include "yuck/panel/panel_widgs/panel_brit_ico.yuck")
|
(include "yuck/panel/panel_widgs/panel_brit_ico.yuck")
|
||||||
(include "yuck/panel/panel_widgs/panel_wifi_ico.yuck")
|
(include "yuck/panel/panel_widgs/panel_wifi_ico.yuck")
|
||||||
|
(include "yuck/panel/panel_widgs/panel_weather_ico.yuck")
|
||||||
(include "yuck/panel/panel_widgs/panel_notif_ico.yuck")
|
(include "yuck/panel/panel_widgs/panel_notif_ico.yuck")
|
||||||
|
|
||||||
(defwidget panel_right [h]
|
(defwidget panel_right [h]
|
||||||
@ -19,6 +20,7 @@
|
|||||||
|
|
||||||
;Widgets:
|
;Widgets:
|
||||||
(panel_notif_ico :h "${h}")
|
(panel_notif_ico :h "${h}")
|
||||||
|
(panel_weather_ico :h "${h}")
|
||||||
(panel_wifi_ico :h "${h}")
|
(panel_wifi_ico :h "${h}")
|
||||||
(panel_brit_ico :h "${h}")
|
(panel_brit_ico :h "${h}")
|
||||||
(panel_vol_ico :h "${h}")
|
(panel_vol_ico :h "${h}")
|
||||||
|
12
yuck/panel/panel_widgs/panel_weather_ico.yuck
Normal file
12
yuck/panel/panel_widgs/panel_weather_ico.yuck
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
(defwidget panel_weather_ico [h]
|
||||||
|
(label
|
||||||
|
:class "panel_mini_widg panel_ico panel_weather_ico"
|
||||||
|
:halign "end"
|
||||||
|
:valign "end"
|
||||||
|
:height "${h}"
|
||||||
|
:width "${h}"
|
||||||
|
;:active true
|
||||||
|
:text "${weather_info.weather[0].icon}"
|
||||||
|
:tooltip "${weather_info.weather[0].main} ${weather_info.main.temp}"
|
||||||
|
)
|
||||||
|
)
|
@ -34,7 +34,7 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
;Weather
|
;Weather
|
||||||
(defpoll weather
|
(defpoll weather_info
|
||||||
:interval "5m"
|
:interval "5m"
|
||||||
:initial "{\"coord\":{\"lon\":0,\"lat\":0},\"weather\":[{\"id\":0,\"main\":\"Unknown\",\"description\":\"unknown\",\"icon\":\"00d\"},{\"id\":0,\"main\":\"Not available\",\"description\":\"not available\",\"icon\":\"00d\"}],\"base\":\"stations\",\"main\":{\"temp\":0,\"feels_like\":0,\"temp_min\":0,\"temp_max\":0,\"pressure\":0,\"humidity\":0,\"sea_level\":0,\"grnd_level\":0},\"visibility\":0,\"wind\":{\"speed\":0,\"deg\":0},\"rain\":{\"1h\":0},\"clouds\":{\"all\":0},\"dt\":978310800,\"sys\":{\"type\":0,\"id\":0,\"country\":\"UK\",\"sunrise\":978310800,\"sunset\":978310800},\"timezone\":0,\"id\":0,\"name\":\"Unknown\",\"cod\":0}"
|
:initial "{\"coord\":{\"lon\":0,\"lat\":0},\"weather\":[{\"id\":0,\"main\":\"Unknown\",\"description\":\"unknown\",\"icon\":\"00d\"},{\"id\":0,\"main\":\"Not available\",\"description\":\"not available\",\"icon\":\"00d\"}],\"base\":\"stations\",\"main\":{\"temp\":0,\"feels_like\":0,\"temp_min\":0,\"temp_max\":0,\"pressure\":0,\"humidity\":0,\"sea_level\":0,\"grnd_level\":0},\"visibility\":0,\"wind\":{\"speed\":0,\"deg\":0},\"rain\":{\"1h\":0},\"clouds\":{\"all\":0},\"dt\":978310800,\"sys\":{\"type\":0,\"id\":0,\"country\":\"UK\",\"sunrise\":978310800,\"sunset\":978310800},\"timezone\":0,\"id\":0,\"name\":\"Unknown\",\"cod\":0}"
|
||||||
`sh/values/weather/weather.sh`
|
`sh/values/weather/weather.sh`
|
||||||
|
Loading…
Reference in New Issue
Block a user