gaetanserre / LeanCal

This is a simple calendar manager written in Lean that sends notification using `notify-send` whenever an event is due. Compatible with Waybar.
GNU General Public License v3.0
0 stars 0 forks source link

Lean Calendar

This is a simple calendar manager written in Lean that sends notification using notify-send whenever an event is due. Compatible with Waybar.

Usage

Install Lean and run the following command to compile the project:

./compile.sh

The executable will be generated at the root of the project. A folder named .LeanCal will be created in your home directory. It contains

Event format

The events are stored in the events.txt file. Each event is stored in a single line with the following format:

yy-mm-dd_hh:mm^Event description^[n-{d|m|y}]

The date is in the format yy-mm-dd_hh:mm and the recurrence is optional. The recurrence is a number followed by a dash and a letter. The letter can be d for days, m for months or y for years. For instance, 1-d means that the event will be repeated every day.

Example: 24-08-30_12:00^Meeting with Gruvbox^7-d

Waybar

LeanCal can be integrated with Waybar. To do so, add the following block to your Waybar configuration:

"custom/leanCal": {
    "format": "{}",
    "tooltip": true,
    "interval": 60,
    "exec": "path/to/leancal -w -co",
    "return-type": "json"
  }

It will display the date along with the number of events due today. When hovered, it will display the events due today and tomorrow.

Example: 🕛 10:55 🗓️ 04/07 (1)

Remove the -co flag if you just want basic display, i.e. the number of events due today.