19 lines
501 B
Plaintext
19 lines
501 B
Plaintext
|
(defpoll time
|
||
|
:interval "1s"
|
||
|
`date +'{"hour":"%H","min":"%M","sec":"%S"}'`)
|
||
|
(defwidget clock[]
|
||
|
(clock-h))
|
||
|
|
||
|
(defwidget clock-v[]
|
||
|
(box
|
||
|
:class "clock widget"
|
||
|
:orientation "vertical"
|
||
|
(label :text "${time.hour}")
|
||
|
(label :text "${time.min}")))
|
||
|
|
||
|
(defwidget clock-h[]
|
||
|
(box
|
||
|
:class "clock"
|
||
|
:orientation "horizontal"
|
||
|
(label :text "${time.hour}:${time.min}")))
|