add better filtering

This commit is contained in:
2026-04-17 15:51:00 +02:00
parent 99a99dd04a
commit 7af7b1c1ae
2 changed files with 9 additions and 3 deletions
+9 -2
View File
@@ -1,4 +1,4 @@
import { format } from "date-fns";
import { format, getMonth } from "date-fns";
import Handlebars from "handlebars";
import romcal from "romcal";
import { isToday, startOfToday, getYear } from "date-fns";
@@ -9,11 +9,18 @@ import { isToday, startOfToday, getYear } from "date-fns";
* @returns {string} A string containing the CSS styles.
*/
function css() {
const now = startOfToday();
let color = "#007acc"; // Default color
// Get today's liturgical event from the Roman calendar
const event = romcal
.calendarFor(getYear(startOfToday()))
.calendarFor({
year: getYear(now),
country: "croatia",
query: {
month: getMonth(now),
},
})
.find((e) => isToday(new Date(e.moment)));
if (event) {
-1
View File
@@ -8,7 +8,6 @@ import open from "open";
let lastDate = new Date();
let interval;
// Open a hidden screen
const app = statusItem(base, {
title: "✝️",
width: 800,