diff --git a/yuck/panel/panel_sections/panel_widg_right.yuck b/yuck/panel/panel_sections/panel_widg_right.yuck index 0977949..0d7a0f7 100644 --- a/yuck/panel/panel_sections/panel_widg_right.yuck +++ b/yuck/panel/panel_sections/panel_widg_right.yuck @@ -4,6 +4,7 @@ (include "yuck/panel/panel_widgs/panel_bat_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_weather_ico.yuck") (include "yuck/panel/panel_widgs/panel_notif_ico.yuck") (defwidget panel_right [h] @@ -19,6 +20,7 @@ ;Widgets: (panel_notif_ico :h "${h}") + (panel_weather_ico :h "${h}") (panel_wifi_ico :h "${h}") (panel_brit_ico :h "${h}") (panel_vol_ico :h "${h}") diff --git a/yuck/panel/panel_widgs/panel_weather_ico.yuck b/yuck/panel/panel_widgs/panel_weather_ico.yuck new file mode 100644 index 0000000..771f60b --- /dev/null +++ b/yuck/panel/panel_widgs/panel_weather_ico.yuck @@ -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}" + ) +) \ No newline at end of file diff --git a/yuck/vars/vars.yuck b/yuck/vars/vars.yuck index 6909843..44f2083 100644 --- a/yuck/vars/vars.yuck +++ b/yuck/vars/vars.yuck @@ -34,7 +34,7 @@ ) ;Weather -(defpoll weather +(defpoll weather_info :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}" `sh/values/weather/weather.sh`