added datetime widget
This commit is contained in:
4
.config/eww/widgets/datetime.scss
Normal file
4
.config/eww/widgets/datetime.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
.datetime {
|
||||
background: #2E3440;
|
||||
color: #E5E6E7;
|
||||
}
|
17
.config/eww/widgets/datetime.yuck
Normal file
17
.config/eww/widgets/datetime.yuck
Normal 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
|
||||
)
|
Reference in New Issue
Block a user