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
|
/* colitur-x / colitur-mu -- compile-time configuration, suckless style.
* Edit, `make`, `make install`. There is no runtime config file: colitur
* itself owns the CALENDAR's configuration (language, sigla, overlays);
* this file owns only how it is painted.
*/
/* ------------------------------------------------------------------ fonts */
/* Any fontconfig name. Terminus is a bitmap font, so it exists only at
fixed pixelsizes (12 14 16 18 20 22 24 28 32) and wants antialias=false;
asking for a size it does not have silently gets you a substitute. */
static const char *font = "Terminus:pixelsize=20:antialias=false";
static const char *font_big = "Terminus:pixelsize=20:style=Bold:antialias=false";
/* ---------------------------------------------------------------- colours */
/* Liturgical colours, keyed by the name colitur emits in the `colour`
column. bg is the cell, fg is its text; every other marker is derived
from these two so it cannot become invisible against an odd combination. */
static const struct { const char *name, *bg, *fg; } palette[] = {
{ "white", "#f7f5ef", "#1a1a1a" },
{ "red", "#b03030", "#ffffff" },
{ "violet", "#5a3a78", "#ffffff" },
{ "green", "#2f6b3a", "#ffffff" },
{ "black", "#202020", "#e0e0e0" },
{ "rose", "#d9a0b0", "#1a1a1a" },
};
static const char *col_unknown_bg = "#808080"; /* a colour not listed above */
static const char *col_unknown_fg = "#ffffff";
static const char *col_bg = "#141414"; /* window background */
static const char *col_grid = "#3a3a3a"; /* rule above the detail pane */
static const char *col_head = "#8a8a8a"; /* title and weekday row */
static const char *col_detail = "#e8e8e8"; /* detail pane text */
/* The selected day is ringed TWICE, dark outside and bright inside, so it
survives on a white cell and on a red one alike. A single bright ring
vanishes against white; a single dark one vanishes against black. */
static const char *col_sel_dark = "#1a1a1a";
static const char *col_sel_light = "#ffd24a";
enum { SEL_RING = 3 }; /* px per ring */
/* --------------------------------------------------------------- geometry */
/* CELL_W/CELL_H must suit the font: a cell holds the day number plus
NAME_LINES lines of `font`. Line height itself is taken from the font at
runtime, so only these two need revisiting when you change size.
Rough guide: CELL_W >= 10 * (widest name chars you want), CELL_H >=
big-font height + NAME_LINES * font height + 12. */
enum {
CELL_W = 196,
CELL_H = 116,
PAD = 10, /* margin around the grid */
HEAD_H = 62, /* title + weekday headings */
DETAIL_H = 116, /* the pane under the grid */
NAME_LINES = 3, /* how many lines a feast name gets */
};
/* ------------------------------------------------------------------ labels */
/* Weekday headings, Sunday first. These are the VIEWER's own text, not
colitur's: the day names inside each cell come from the CSV and follow
whatever --lang produced it. Set these to match. */
static const char *dow_headings[7] = {
"Dom", "Fer II", "Fer III", "Fer IV", "Fer V", "Fer VI", "Sab"
};
static const char *label_epistle = "Epistola";
static const char *label_gospel = "Evangelium";
static const char *window_title = "colitur";
/* Which rank gets a badge, and what the badge says. The value is compared
against colitur's own `rank` column (class-1 | class-2 | class-3 |
class-4), so "class-2" here would mark second-class feasts instead. */
static const char *badge_rank = "class-1";
static const char *badge_glyph = "I";
|