2024-03-07 13:49:47 -07:00

12 lines
489 B
Common Lisp

;; -*-lisp-*-
(defpoll clock--data :interval "500ms"
`date +'{"hour": "%H", "minute": "%M", "second": "%S", "year": "%Y", "day": "%d", "month": "%m", "dow": "%A", "month_name": "%B", "unix": %s}'`)
(defwidget clock []
(box :class "module text"
:spacing 0
:orientation "v"
(label :class "special"
:text "${clock--data.hour}:${clock--data.minute}:${clock--data.second}")
(label :text "${clock--data.year}-${clock--data.month}-${clock--data.day}")))