1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# colitur-x
A raw Xlib front-end for [colitur](../colitur): reads `colitur emit --format
csv` on stdin, draws the year as a month grid coloured by each day's
liturgical colour, and shows the selected day's readings underneath.
make && make install # into ~/.local/bin
colitur emit --format csv --from 2027 --to 2027 | colitur-x
Keys: arrows or `hjkl` move, `n`/`p` change month, `q` quits.
It opens on **today** when the input covers it. Reading the clock is a
presentation choice and belongs in a viewer: colitur's own kernel is pure
and deliberately never asks what day it is, which is what lets it be tested
to the year 9999.
colitur-x -g 1200x820 < day.csv # preferred size, if the WM allows
CX_DUMP=/tmp/f.ppm colitur-x < day.csv # write one frame, then exit
The grid **fills whatever size it is given**: cell width is the window
divided seven ways, cell height six ways, and the number of lines a feast
name gets is whatever fits. Under a tiling window manager it therefore uses
its whole tile rather than sitting in a corner of one, and resizing reflows
instead of clipping. `config.h` sets minimums, not sizes.
It reads CSV on **stdin** and nothing else, so the shell decides what it
shows. One month:
colitur emit --format csv --from 2027 --to 2027 | grep "^2027-04" | colitur-x
The header line is detected rather than assumed, so filtering it away is
fine. An earlier version skipped the first line unconditionally, which meant
that pipeline silently dropped 1 April -- the program fought the obvious
filter instead of composing with it.
Another language, or a local calendar:
colitur emit --format csv --from 2027 --to 2027 --lang en | colitur-x
colitur emit --format csv --from 2027 --to 2027 \
--overlay ~/parish.sexp | colitur-x
With no input it says so and exits 2.
## Why it exists
colitur is a Unix tool: it computes and prints. This is a separate program
that composes with it, so colitur's own dependencies stay frozen
(`dune alcotest qcheck qcheck-alcotest sexplib ppx_sexp_conv`) and its
kernel stays pure.
## Build
make
`-std=c99 -Os -Wall -Wextra`, linking libX11 and libXft. ~17 KB.
Configuration is compile-time, suckless style: edit `config.h` and rebuild.
There is deliberately no runtime config file — colitur itself owns the
calendar's configuration (language, sigla, overlays); this program owns only
how it is painted.
## Limits, stated rather than discovered
- X11 only. Runs under XWayland but is not a Wayland client.
- Read-only. It renders what colitur emits; it edits nothing.
- Xft is used for antialiasing and UTF-8. Dropping it for core X11 fonts
would reduce the dependency list to libX11 and libc alone, at the cost of
correct rendering for `æ`/`œ` and Polish diacritics. Not worth it.
- A tiling window manager will ignore the size hints and give the grid its
own tile; the layout handles that, the empty space is the WM's choice.
## The microui variant
An editable front-end -- where year, language, book-name form and numbering
tradition are buttons that re-run colitur -- lives in
[colitur-experiments](../colitur-experiments) rather than here, so this repo
holds one finished program instead of a finished one and a sketch.
### Which to use
`colitur-x` renders; `colitur-mu` renders and lets you change the invocation.
Neither is the right answer for a non-technical user on a machine that is not
yours — both are X11-only and must be compiled. For that, a static site or a
small local web UI wins.
|