yadm-config/.config/eww/widgets/bar/elements/time.yuck

28 lines
566 B
Text

(defpoll bar-time-display :interval "1s" :initial "" `date +"󰃭 %d  %R"`)
(defwidget bar-time []
(box
:class "widget default-padding"
:space-evenly false
:spacing 10
{bar-time-display}
"|"
(label
:visible {hour-time <= 6 || hour-time > 22}
:text ""
)
(label
:visible {hour-time > 6 && hour-time <= 10}
:text ""
)
(label
:visible {hour-time > 10 && hour-time <= 18}
:text ""
)
(label
:visible {hour-time > 18 && hour-time <= 22}
:text ""
)
)
)