dotfiles/dotconfig/eww/analog_clock/clock.yuck
2024-01-29 12:31:17 +00:00

87 lines
1.4 KiB
Text

(defpoll hours
:interval "1s"
:initial "00"
`date +%I`)
(defpoll minutes
:interval "1s"
:initial "00"
`date +%M`)
(defpoll seconds
:interval "1s"
:initial "00"
`date +%S`)
(defpoll ampm
:interval "1s"
:initial "00"
`date +%p`)
(defpoll date
:interval "1s"
:initial "1970-01-01"
`date +%Y-%m-%d`)
(defwidget clock []
(box :vexpand false :hexpand false
:width 155
:height 155
:space-evenly false
(box :width 155 :height 155 :class "analog-clock")
(box
:height 155
:width 200
:class "numerical-clock"
:orientation "v"
:space-evenly false
(box
:class "time-container"
(box
:class "time-first"
(label :text hours)
)
(box
:class "time"
(label :text minutes)
)
(box
:class "time"
(label :text seconds)
)
(box
:class "time"
(label :text ampm)
)
)
(box
:class "date"
(label :text " ${date}")
)
)
))
(defwindow clock
:monitor 0
:geometry (geometry
:x "12%"
:y "10%"
:width "150px"
:height "150px"
:anchor "bottom left")
:stacking "bg"
:exclusive true
:focusable false
:namespaces "widget_clock"
(clock))