From 2bc5e50b163bc297617a0e5890ca07cd58a3a55c Mon Sep 17 00:00:00 2001 From: Viyurz Date: Tue, 19 Nov 2024 10:10:46 +0100 Subject: [PATCH] feat(eww): Make calendar interactive --- .config/eww/eww.scss | 4 ++-- .config/eww/eww.yuck | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index 877e992..af7aba3 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -5,7 +5,7 @@ font-size: 13px; } -.bar, tooltip { +.bar, tooltip, window.calendar { background-image: linear-gradient(160deg, $background1, $background2), linear-gradient(160deg, $accent1, $accent2); background-clip: padding-box, border-box; background-origin: border-box; @@ -95,7 +95,7 @@ circular-progress > * { font-size: 11px; } -tooltip { +tooltip, window.calendar { border: 1px solid transparent; border-radius: 4px; } diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index 1a01635..c949239 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -216,15 +216,26 @@ ) (defwidget clock [] - (tooltip - (calendar :day {day} - :month {month} - :year {year} - ) + (eventbox :onclick "eww open --toggle calendar" (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