forked from Shinonome/dots-hyprland
61 lines
1.5 KiB
Plaintext
61 lines
1.5 KiB
Plaintext
(defvar date_rev false)
|
|
|
|
(defwidget clock_module []
|
|
(eventbox
|
|
:onhover "${EWW_CMD} update date_rev=true"
|
|
:onhoverlost "${EWW_CMD} update popup='none' && ${EWW_CMD} update date_rev=false"
|
|
:onclick "${EWW_CMD} update popup='calendar'"
|
|
:class "${popup == 'calendar' ? 'calendar-win' : ''}"
|
|
; clock-module
|
|
(box
|
|
:space-evenly false
|
|
:orientation "v"
|
|
(box
|
|
:class "module"
|
|
:valign "start"
|
|
:space-evenly false
|
|
:orientation "h"
|
|
(box
|
|
:space-evenly false
|
|
(label
|
|
:text {time.hour}
|
|
:class "clock hour")
|
|
(label
|
|
:text ":"
|
|
:class "clock")
|
|
(label
|
|
:text {time.minute}
|
|
:class "clock minute"))
|
|
(revealer
|
|
:transition "slideright"
|
|
:reveal true ; Replace with "date_rev" for reveal on hover
|
|
:duration "250ms"
|
|
:class "date-clock"
|
|
(button
|
|
:class "date-clock"
|
|
:onclick "${EWW_CMD} update popup='calendar'"
|
|
"${time.day}, ${time.date}"
|
|
)
|
|
)
|
|
)
|
|
(revealer
|
|
:reveal "${popup == 'calendar'}"
|
|
:transition "slideright"
|
|
:duration "0ms"
|
|
(revealer
|
|
:reveal "${popup == 'calendar'}"
|
|
:transition "crossfade"
|
|
:duration "0ms"
|
|
(revealer
|
|
:reveal "${popup == 'calendar'}"
|
|
:transition "slidedown"
|
|
:duration "0ms"
|
|
(calendar)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|