diff --git a/dotconfig/eww/analog_clock/clock.scss b/dotconfig/eww/analog_clock/clock.scss new file mode 100644 index 0000000..a321cc0 --- /dev/null +++ b/dotconfig/eww/analog_clock/clock.scss @@ -0,0 +1,51 @@ + +.clock { + border-radius: 31px; + background: rgba(40,40,40,0.8); +} + + +.analog-clock { + padding: 2rem; + background: #282828; + border-radius: 100%; + border: 7px solid #282828; + box-shadow: inset 4px 4px 10px rgba(0,0,0,0.5), + inset -4px -4px 10px rgba(67,67,67,0.5), + 4px 4px 10px rgba(0,0,0,0.3); + border-radius: 50%; +} + + +.time-container { + margin-top: 15px; + margin-left: 20px; + margin-right: 20px; +} + +.time-first { + padding: 10px; + background: rgba(20,20,20,0.7); + border-radius: 10px; + color: #00FFFF; +} + +.time { + padding: 10px; + margin-left: 5px; + background: rgba(20,20,20,0.7); + border-radius: 10px; + color: #00FFFF; + +} + +.date { + padding: 10px; + margin: 5px 20px; + background: rgba(20,20,20,0.7); + border-radius: 10px; + color: #00FFFF; +} + + + diff --git a/dotconfig/eww/analog_clock/clock.yuck b/dotconfig/eww/analog_clock/clock.yuck new file mode 100644 index 0000000..118605a --- /dev/null +++ b/dotconfig/eww/analog_clock/clock.yuck @@ -0,0 +1,87 @@ + + +(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)) + + diff --git a/dotconfig/eww/eww.scss b/dotconfig/eww/eww.scss new file mode 100644 index 0000000..0b93a3a --- /dev/null +++ b/dotconfig/eww/eww.scss @@ -0,0 +1 @@ +@import "analog_clock/clock.scss" diff --git a/dotconfig/eww/eww.yuck b/dotconfig/eww/eww.yuck new file mode 100644 index 0000000..4b89622 --- /dev/null +++ b/dotconfig/eww/eww.yuck @@ -0,0 +1 @@ +(include "./analog_clock/clock.yuck")