(defpoll day :interval "1s" `date +\"%A\"`)
(defpoll month :interval "1s" `date +\"%b\"`)
(defpoll date :interval "1s" `date +\"%d\"`)

(defpoll h :interval "1s" `date +\"%l\"`)
(defpoll m :interval "1s" `date +\"%M\"`)
(defpoll s :interval "1s" `date +\"%S\"`)

(defvar show_date false)

(defwidget date_time []
    (eventbox :onhover "${eww} update show_date=true" :onhoverlost "${eww} update show_date=false"
        (box :class "datetime_module" :space-evenly "false"
            (revealer :reveal show_date :transition "slideleft"
                (box :class "bardate" :space-evenly "false" :orientation "h" :spacing "2"
                    (label :text day :class "datetime")
                    (label :text ", " :class "datetime")
                    (label :text month :class "datetime")
                    (label :text " ")
                    (label :text date :class "datetime")
                )
            )
            (box :space-evenly "false" :orientation "h" :spacing "2"
                (label :text h :class "datetime" )
                (label :text ":" :class "datetime" )
                (label :text m :class "datetime")
                (label :text " ")
                (label :text p :class "datetime")
            )
        )
    )
)
