;-*-Lisp-*-
    (defwidget player []
      (box :orientation "h" :space-evenly "false" :class "player" 
        (box :class "musicart" :halign "center" :valign "center" :style "background-image: url('${cover}')")
        (box :orientation "v" :class "music-info" :valign "center" :halign "center" :space-evenly "false"
          (box :class "musictitle" music3)
          (box :class "musicalbum" music2)
          (box :class "musicartist" music)
          (box :orientation "h" :halign "center" :valign "center" :class "musicbtn" :space-evenly "false" 
            (button :onclick "playerctl -p Lollypop previous" "")
            (button :onclick "playerctl -p Lollypop play-pause" musicstat)
            (button :onclick "playerctl -p Lollypop next" ""))
          (scale :min 0 :max duration :active "false" :value position :class "progress-bar"))))
    (defwidget system_info [] 
      (box :orientation "v" :space-evenly "true" :class "sliders-side" 
          (circular-progress :class "circprog-cpu-side" :width 200 :thickness 25 :value {EWW_CPU.avg} "")
        (box :orientation "h" :space-evenly "false" :vexpand "false"
          (circular-progress :halign "baseline" :class "circprog-ram-side":width 200 :thickness 25 :value {EWW_RAM.used_mem_perc} "")
          (circular-progress :halign "baseline" :class "circprog-hdd-side":width 200 :thickness 25 :value {EWW_DISK["/"].used_perc} ""))))
    (defwidget profile [] 
      (box :orientation "v" :space-evenly "false" :class "profile" 
        (box :orientation "h" :space-evenly "true" 
          (image :path "/home/barbarossa/Pictures/barbarossaCircle.png" :image-width 200 :image-height 200 :class "pfp"))
        (box :orientation "v" :space-evenly "false" 
          (box :class "pfptxt" :valign "center" user)
          (box :class "subpfptxt" :halign "center" "@${host}"))))
    (defwidget launch [] 
      (box :orientation "v" :space-evenly "false" :class "launch" 
        (box :orientation "h" :halign "center" :class "launch1" :space-evenly "false" 
          (button :class "internet" :onclick "wmctrl -xa firefox || setsid -f firefox" "")
          (button :class "mail" :onclick "wmctrl -xa geary || setsid -f geary" "")
          (button :class "music" :style "font-family: 'Font Awesome 6 Free Solid'" :onclick "wmctrl -xa lollypop || setsid -f lollypop" "")
          (button :class "file" :onclick "setsid -f nautilus" "")
          (button :class "editor" :onclick "wmctrl -xa emacs || setsid -f emacs" ""))
        (box :orientation "h" :halign "center" :class "launch2" :space-evenly "false" 
          (button :class "pomo" :onclick "wmctrl -xa io.elementary.calendar || setsid -f io.elementary.calendar" "")
          (button :class "notes" :onclick "wmctrl -xa gtg || setsid -f gtg" "")
          (button :class "rstudio" :onclick "wmctrl -xa Steam || setsid -f steam" "")
          (button :class "slack" :onclick "wmctrl -xa discord || setsid -f discord" "")
          (button :class "terminal" :onclick "setsid -f alacritty" ""))))
    (defwidget weather []
        (box :class "weather" :orientation "v" :space-evenly "false" 
             (box :class "weather-icon-side" :style "color: ${weather-hex}" weather-icon)
             (box :class "temp-info" :orientation "h" :halign "center" :space-evenly "false"
                  (box :class "temperature-side" temperature)
                  (box :class "thermometer" ""))
             (box :class "weather-stat-side" (label :halign "center" :wrap "true" :text weather-stat-side))))
    (defwidget vol [] 
      (box :orientation "v" :space-evenly "true" :class "vol" 
        (box :class "vol-icon" vol-icon)
        (scale :min 0 :max 100 :active "false" :value current-vol)))
    (defwidget bright [] 
      (box :orientation "v" :space-evenly "true" :class "bright" 
        (box :class "bright-icon" "")
        (scale :min 0 :max 100 :active "false" :value current-bright)))
  
  
    ;;  Player vars 
    (deflisten music "playerctl -F -p Lollypop metadata --format '{{ artist }}'")
    (deflisten music2 "playerctl -F -p Lollypop metadata --format '{{ album }}'")
    (deflisten music3 "playerctl -F -p Lollypop metadata --format '{{ title }}'")
    (deflisten musicstat "~/.config/eww/scripts/musicstatus")
    (defpoll position :interval "2s"  "playerctl -p Lollypop position | sed 's/..\{6\}$//'")
    (deflisten duration "playerctl -F -p Lollypop metadata mpris:length | sed 's/.\{6\}$//'")
    (deflisten cover :initial "/home/barbarossa/.config/eww/images/image.png" "playerctl -F -p Lollypop metadata mpris:artUrl")
    ;; (defpoll art :interval "1s"  "~/.config/eww/scripts/getart || cp ~/.config/eww/images/image.png /tmp/mpd/cover.png")
    ; (defpoll like_status :interval "1s"  "~/.config/eww/scripts/mpd/mpd_to_like_or_not.sh -s")
    ;;  Calendar vars 
    (defpoll time :interval "5s"
      "date '+%H:%M'")
    (defpoll date :interval "30s"
      "date'+%b %d, %Y'")
    ;;  Profile vars
    (defpoll user :interval "1h"  "echo $USER")
    (defpoll host :interval "1h"  "uname -n")
    ;;  Launcher vars 
    ;;  Weather vars 
    (defpoll weather-icon :interval "5s"  "cat /tmp/weather/weather-icon")
    (defpoll weather-hex :interval "5s"  "cat /tmp/weather/weather-hex")
    (defpoll temperature :interval "5s"  "cat /tmp/weather/weather-degree")
    (defpoll weather-stat-side :interval "5s"  "~/.config/eww/scripts/weather-trimmer")
    ;(defpoll weather-quote :interval "5s"  "~/.config/eww/scripts/getwethquote")
    (defvar pango "&lt;span foreground=\"#d08770\" font_family=\"icons\"&gt;&lt;/span&gt;")
    ;; Vol vars 
    (deflisten vol-icon  "tail -F /tmp/vol-icon")
    (deflisten current-vol  "tail -F /tmp/vol")
    ;; Bright vars 
    (deflisten current-bright  "tail -F /tmp/bright")
        (defwindow main_bottom 
			    :geometry (geometry :anchor "bottom center" :y "12px")
			     				(box :class "main_box" :orientation "h" :space-evenly "false" 
          (profile)
          (player)
          (launch)
          (weather)
          (system_info)))
    (defwindow vol 
			    :geometry (geometry :height "16%" :y "18%" :anchor "center")
			     				(vol))
    (defwindow bright 
			    :geometry (geometry :height "16%" :y "18%" :anchor "center")
			     				(bright))
