From e9cb27e509bf85fa9ae8e04e6b1b42bae0050258 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Mon, 29 Jan 2024 00:00:09 -0500 Subject: [PATCH] feat(eww): add weather widget Signed-off-by: Lucas Sta Maria --- .config/eww/eww.yuck | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index ed58738..c5f34b5 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -29,6 +29,7 @@ "scripts/songcardartist") (defpoll songcard_button :interval "1s" "scripts/songcardplayrender") +(defpoll weather_text :interval "60s" "curl 'wttr.in/Boston?m&format=1'") (defpoll wifi_label :interval "1s" "scripts/wifi") (defpoll bluetooth_label :interval "1s" "scripts/bluetooth") (defpoll volume_level :interval "1s" "scripts/volume") @@ -118,6 +119,7 @@ :space-evenly "false" :spacing 10 (literal :content {autosus}) + (weather) (wifi) (bluetooth) (brightness) @@ -125,6 +127,10 @@ (power) (timedate))) +;; Displays the current weather +(defwidget weather [] + (label :text {weather_text})) + ;; A widget that displays the current wifi SSID (defwidget wifi [] (icon-module :icon "↑"