feat(eww): Make calendar interactive

This commit is contained in:
Viyurz 2024-11-19 10:10:46 +01:00
parent 114ca1fd2b
commit 2bc5e50b16
Signed by: Viyurz
SSH key fingerprint: SHA256:IskOHTmhHSJIvAt04N6aaxd5SZCVWW1Guf9tEcxIMj8
2 changed files with 18 additions and 7 deletions

View file

@ -5,7 +5,7 @@
font-size: 13px; font-size: 13px;
} }
.bar, tooltip { .bar, tooltip, window.calendar {
background-image: linear-gradient(160deg, $background1, $background2), linear-gradient(160deg, $accent1, $accent2); background-image: linear-gradient(160deg, $background1, $background2), linear-gradient(160deg, $accent1, $accent2);
background-clip: padding-box, border-box; background-clip: padding-box, border-box;
background-origin: border-box; background-origin: border-box;
@ -95,7 +95,7 @@ circular-progress > * {
font-size: 11px; font-size: 11px;
} }
tooltip { tooltip, window.calendar {
border: 1px solid transparent; border: 1px solid transparent;
border-radius: 4px; border-radius: 4px;
} }

View file

@ -216,15 +216,26 @@
) )
(defwidget clock [] (defwidget clock []
(tooltip (eventbox :onclick "eww open --toggle calendar"
(calendar :day {day}
:month {month}
:year {year}
)
(label :text "󰥔 ${datetime}") (label :text "󰥔 ${datetime}")
) )
) )
(defwindow calendar :monitor 0
:geometry (geometry :x "5px"
:y "5px"
:width "300px"
:height "169px"
:anchor "top right"
)
:stacking "fg"
:exclusive false
(calendar :day {day}
:month {month}
:year {year}
)
)
; Bar ; Bar