diff --git a/de/home/.config/eww/eww.scss b/de/home/.config/eww/eww.scss index 3ebe1ee..ee89a32 100644 --- a/de/home/.config/eww/eww.scss +++ b/de/home/.config/eww/eww.scss @@ -114,3 +114,7 @@ button.active { background-size: cover; background-repeat: no-repeat; } +.weather { + border-radius: 8px; + background-color: ${color7}; +} diff --git a/de/home/.config/eww/eww.yuck b/de/home/.config/eww/eww.yuck index ac3e199..3a17572 100644 --- a/de/home/.config/eww/eww.yuck +++ b/de/home/.config/eww/eww.yuck @@ -347,25 +347,40 @@ :reserve (struts :side "top" :distance "4%") (bar)) -(defpoll rat_image :interval "5s" +(defwidget widgets [] + (box :class "widgets" + :orientation "v" + :spacing 25 + :width 300 + :space-evenly true + (rat) + (weather))) + +(defpoll rat_image :interval "60s" 'scripts/randomrat') ;(defvar rat_image "/home/penelope/Pictures/Phone/Albums/Rattos/20211109_042550_IMG_9873.JPG") (defwidget rat [] (box :class "rat" :orientation "h" - :width 400 - :height 400 + :width 300 + :height 300 :space-evenly true :style "background-image: url('${rat_image}');")) +(defwidget weather [] + (box + :class "weather" + :width 300 + :height 200)) + (defwindow widgets :windowtype "normal" :exclusive false - :geometry (geometry :x "10%" - :y "10%" + :geometry (geometry :x "10px" + :y "10px" :width "10px" :height "10px" - :anchor "top center") + :anchor "top left") :stacking "bg" - (rat)) + (widgets)) diff --git a/de/home/.config/eww/rat.jpg b/de/home/.config/eww/rat.jpg new file mode 100644 index 0000000..edd5cfa Binary files /dev/null and b/de/home/.config/eww/rat.jpg differ diff --git a/de/home/.config/eww/scripts/randomrat b/de/home/.config/eww/scripts/randomrat index 2d27738..6a706eb 100755 --- a/de/home/.config/eww/scripts/randomrat +++ b/de/home/.config/eww/scripts/randomrat @@ -1,6 +1,7 @@ #!/bin/bash img_dir="${HOME}/Pictures/Phone/Albums/Rattos/" -img_list=$( find "${img_dir}" -iname "*.jpg" -or -iname "*.png" ) +img_list=$( find "${img_dir}" -iname '*.jpg' -or -iname '*.png' -or -iname '*.heic') img=$( shuf -n 1 <<< ${img_list} ) -echo "${img}" +convert "${img}" -resize x400\> ./rat.jpg +echo "./rat.jpg"