added datetime widget
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
:halign 'end'
|
||||
(loremText :text "Bar stuff")
|
||||
(datetime)
|
||||
)
|
||||
)
|
||||
|
||||
|
@@ -1,2 +1,3 @@
|
||||
@import 'widgets/media';
|
||||
@import 'widgets/datetime.scss';
|
||||
@import 'widgets/lorem-text';
|
||||
|
@@ -1,2 +1,3 @@
|
||||
(include "widgets/media.yuck")
|
||||
(include "widgets/datetime.yuck")
|
||||
(include "widgets/lorem-text.yuck")
|
||||
|
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