40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
(defvar date_rev false)
|
|
|
|
(defwidget clock-mod []
|
|
(module
|
|
(eventbox
|
|
:onhover "${EWW_CMD} update date_rev=true"
|
|
:onhoverlost "${EWW_CMD} update date_rev=false"
|
|
(box
|
|
:class "datetime"
|
|
(overlay
|
|
(box
|
|
:orientation "v"
|
|
(button
|
|
:class "hour" hour)
|
|
(button
|
|
:class "minute" minute))
|
|
(revealer
|
|
:reveal date_rev
|
|
(box
|
|
:class "date"
|
|
:orientation "v"
|
|
(button
|
|
:onclick "${EWW_CMD} open --toggle calendar"
|
|
:onrightclick "${EWW_CMD} open --toggle powermenu"
|
|
:class "day" day)
|
|
(button
|
|
:onclick "${EWW_CMD} open --toggle calendar"
|
|
:onrightclick "${EWW_CMD} open --toggle powermenu"
|
|
:class "month" month))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defpoll hour :interval "15s" "date '+%H'")
|
|
(defpoll minute :interval "15s" "date '+%M'")
|
|
(defpoll day :interval "15s" "date '+%d'")
|
|
(defpoll month :interval "15s" "date '+%m'") |