eww calendar widget (no ikhal integration)

This commit is contained in:
Anish L 2022-09-02 01:14:26 +10:00
parent 83877313be
commit 65d0db4189
4 changed files with 84 additions and 0 deletions

View file

@ -114,6 +114,7 @@ in
".local/bin/mpv-ify".source = ./bin/mpv-ify; ".local/bin/mpv-ify".source = ./bin/mpv-ify;
".config/eww/eww.yuck".source = ./eww/eww.yuck; ".config/eww/eww.yuck".source = ./eww/eww.yuck;
".config/eww/eww.scss".source = ./eww/eww.scss; ".config/eww/eww.scss".source = ./eww/eww.scss;
".config/eww/widgets.yuck".source = ./eww/widgets.yuck;
# ".local/bin/hotplug-monitor.sh".source = ./bin/hotplug-monitor.sh; # ".local/bin/hotplug-monitor.sh".source = ./bin/hotplug-monitor.sh;
}; };

View file

@ -0,0 +1,50 @@
* {
all: unset;
color: #cdd6f4;
}
/* Calendar */
.cal-box {
background-color: #181825;
border-radius: 8px;
font-family: JetBrainsMono Nerd Font;
font-size: 1.2em;
.cal-inner-box {
padding: 1rem 1rem .3rem 1rem;
.cal {
&.highlight {
padding: 10rem;
}
padding: .8rem .25rem 0rem;
margin-left: 10px;
}
}
}
calendar:selected {
color: #9ece6a;
}
calendar.header {
color: #ad8ee6;
font-weight: bold;
}
calendar.button {
color: #449dab;
}
calendar.highlight {
color: #7aa2f7;
font-weight: bold;
}
calendar:indeterminate {
color: #8C8C8C;
}

View file

@ -0,0 +1,13 @@
; includes:
;widgets
(include "widgets.yuck")
;; Calendar Windows ;;
(defwindow calendar
:geometry (geometry :x "-19px"
:y "50px"
:width "270px"
:height "60px"
:anchor "top right")
(cal))

View file

@ -0,0 +1,20 @@
; widgets
(defpoll time0 :interval "10s" "date '+%H':%M")
(defpoll date :interval "10s" "date '+%b %d'")
;; Calendar Widgets ;;
(defwidget cal []
(box :class "cal-box"
:orientation "v"
(box :class "cal-inner-box"
(calendar :class "cal"
:day calendar_day
:month calendar_month
:year calendar_year))))
(defpoll calendar_day :interval "10h"
"date '+%d'")
(defpoll calendar_month :interval "10h"
"calendar")
(defpoll calendar_year :interval "10h"
"date '+%Y'")