nixos-configs/configs/eww/date/date.yuck

63 lines
1.4 KiB
Text

(defwidget divider []
(box :class "divider"
:orientation "v"
:space-evenly true)
)
(defwidget time []
(box :class "timebox"
:orientation "v"
:space-evenly false
(box :class "time-container"
:orientation "h"
:space-evenly false
:halign "center"
:valign "center"
(label :text "${lithour}" :class "content")
(divider)
(label :text "${litmin}" :class "content")
)
(box :class "date-container"
:orientation "h"
:space-evenly true
:halign "center"
(label :text "${completeday}")
)
)
)
(defwidget cal []
(box :class "cal-box"
:orientation "v"
:space-evenly false
(calendar :class "cal"
:day calendar_day
:month calendar_month
:year calendar_year)
)
)
(defwidget date []
(box :class "date"
:orientation "v"
:space-evenly false
(time)
(cal)
)
)
(defvar date-visible false)
(defwindow date-reveal
:monitor 0
:stacking "overlay"
:geometry (geometry :x "70px"
:y "4px"
:width "0px" ; automatically generated
:height "0px" ; automatically generated
:anchor "top right")
(revealer
:transition "crossfade"
:reveal date-visible
:duration "550ms"
(date)))