dotfiles/dot_config/eww/datetime/datetime.yuck

49 lines
1.5 KiB
Plaintext

(defpoll DAY :interval "1s" "date +%A")
(defpoll TIME :interval "1s" "date +%H:%M:%S")
(defpoll CALDAY :interval "6h" "date +%d")
(defpoll CALMONTH :interval "6h" "date +%m")
(defpoll CALYEAR :interval "1000h" "date +%y")
(defwindow datetime
:monitor 0
:geometry (geometry :x "0px"
:y "10px"
:width "200"
:height "200"
:anchor "top center")
:stacking "overlay"
:windowtype "normal"
:wm-ignore true
(datetimeinfo))
(defwidget datetimeinfo []
(box :orientation "v"
:space-evenly false
(box :orientation "h"
:space-evenly false
:class "time-parent"
:halign "center"
:hexpand true
(box :orientation "v"
:space-evenly false
:class "time-child"
(label :text "${TIME}"
:class "time-label time-label-top"
:halign "start")
(label :text "${DAY}"
:class "doodle"
:halign "center")))
(box :orientation "h"
:space-evenly false
:class "cal-box"
:halign "start"
:hexpand true
(calendar :day "${CALDAY}"
:month "${CALMONTH - 1}"
:year "${CALYEAR}"
:show-details false
:class "cal"
:show-heading true
:show-day-names true
:show-week-numbers true))))