2024-01-29 13:31:17 +01:00
|
|
|
|
|
|
|
|
2024-03-15 15:05:00 +01:00
|
|
|
|
2024-01-29 13:31:17 +01:00
|
|
|
(defpoll hours
|
|
|
|
:interval "1s"
|
|
|
|
:initial "00"
|
|
|
|
`date +%I`)
|
|
|
|
|
|
|
|
|
|
|
|
(defpoll minutes
|
|
|
|
:interval "1s"
|
|
|
|
:initial "00"
|
|
|
|
`date +%M`)
|
|
|
|
|
2024-07-20 22:04:00 +02:00
|
|
|
(defpoll seconds
|
|
|
|
:interval "1s"
|
|
|
|
:initial "00"
|
|
|
|
`date +%S`)
|
2024-01-29 13:31:17 +01:00
|
|
|
|
|
|
|
(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
|
2024-03-04 15:46:28 +01:00
|
|
|
:width 180
|
|
|
|
:height 180
|
2024-01-29 13:31:17 +01:00
|
|
|
:space-evenly false
|
2024-07-20 22:04:00 +02:00
|
|
|
(overlay
|
|
|
|
(box :width 180 :height 180 :class "analog-clock")
|
|
|
|
(box
|
|
|
|
(image :path "/home/primardj/.config/eww/analog_clock/clock_socle.svg" :image-width 170 :image-height 170)
|
|
|
|
)
|
|
|
|
;(transform
|
|
|
|
; :rotate "${4*100/60}" ;"${minutes*100/60}"
|
|
|
|
; :translate-x "0%"
|
|
|
|
; :translate-y "0%"
|
|
|
|
; (image :path "/home/primardj/.config/eww/analog_clock/clock_big_tic.svg" :image-width 170 :image-height 170)
|
|
|
|
;)
|
|
|
|
;(transform
|
|
|
|
; :rotate "${(1+4/60)*100/12}" ; "${(hours+minutes/60)*100/12}"
|
|
|
|
; (image :path "/home/primardj/.config/eww/analog_clock/clock_little_tic.svg" :image-width 170 :image-height 170)
|
|
|
|
;)
|
|
|
|
(transform
|
|
|
|
:translate-x "22%"
|
|
|
|
:translate-y "22%"
|
|
|
|
:scale-x "70%"
|
|
|
|
:scale-y "70%"
|
|
|
|
(circular-progress
|
|
|
|
:class "analog-minutes"
|
|
|
|
:thickness 10
|
|
|
|
:start-at 75
|
|
|
|
:value "${minutes*100/60}"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(transform
|
|
|
|
:translate-x "34%"
|
|
|
|
:translate-y "34%"
|
|
|
|
:scale-x "60%"
|
|
|
|
:scale-y "60%"
|
|
|
|
(circular-progress
|
|
|
|
:class "analog-hours"
|
|
|
|
:thickness 10
|
|
|
|
:start-at 75
|
|
|
|
:value "${(hours+minutes/60)*100/12}"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2024-01-29 13:31:17 +01:00
|
|
|
(box
|
2024-03-04 15:46:28 +01:00
|
|
|
:height 180
|
2024-03-15 15:05:00 +01:00
|
|
|
:width 180
|
2024-01-29 13:31:17 +01:00
|
|
|
:class "numerical-clock"
|
|
|
|
:orientation "v"
|
|
|
|
:space-evenly false
|
|
|
|
(box
|
|
|
|
:class "time-container"
|
|
|
|
(box
|
2024-03-04 15:46:28 +01:00
|
|
|
:class "time"
|
2024-01-29 13:31:17 +01:00
|
|
|
(label :text hours)
|
|
|
|
)
|
|
|
|
(box
|
|
|
|
:class "time"
|
|
|
|
(label :text minutes)
|
|
|
|
)
|
|
|
|
(box
|
|
|
|
:class "time"
|
|
|
|
(label :text ampm)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(box
|
|
|
|
:class "date"
|
|
|
|
(label :text " ${date}")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defwindow clock
|
|
|
|
:monitor 0
|
|
|
|
:geometry (geometry
|
2024-07-20 22:04:00 +02:00
|
|
|
:x "8.5%"
|
|
|
|
:y "58%"
|
2024-03-15 15:05:00 +01:00
|
|
|
:height "200px"
|
|
|
|
:anchor "top right")
|
2024-01-29 13:31:17 +01:00
|
|
|
:stacking "bg"
|
|
|
|
:exclusive true
|
|
|
|
:focusable false
|
|
|
|
:namespaces "widget_clock"
|
|
|
|
(clock))
|
|
|
|
|
|
|
|
|