added datetime widget

This commit is contained in:
2025-03-05 16:10:57 +01:00
parent f317651505
commit e47c4ff387
5 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
.datetime {
background: #2E3440;
color: #E5E6E7;
}

View File

@@ -0,0 +1,17 @@
(defwidget datetime []
(box :class "datetime"
:halign "center"
:valign "center"
{ time == ''
? ''
: time
}
)
)
(defvar time-visible false)
(defpoll time :interval "1s"
:initial "initial-value" ; optional, defaults to poll at startup
:run-while time-visible ; optional, defaults to 'true'
`date +"%H:%M - %a, %d %b"` ; https://www.man7.org/linux/man-pages/man1/date.1.html
)