# 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.