dotfiles/.config/eww/templates/bar/modules/clock.yuck

19 lines
501 B
Plaintext
Raw Normal View History

2023-06-09 10:34:28 +00:00
(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}")))