diff options
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 76 |
1 files changed, 56 insertions, 20 deletions
@@ -1,10 +1,20 @@ -/* colitur-x -- compile-time configuration, suckless style. - * Edit, `make`, done. There is no runtime config file by design. */ +/* 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. + */ -static const char *font = "monospace:size=10"; -static const char *font_big = "monospace:size=14:bold"; +/* ------------------------------------------------------------------ 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"; -/* Liturgical colours, as the engine names them -> what to paint. */ +/* ---------------------------------------------------------------- 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" }, @@ -13,23 +23,49 @@ static const struct { const char *name, *bg, *fg; } palette[] = { { "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"; /* cell borders */ -static const char *col_head = "#8a8a8a"; /* weekday headings */ -static const char *col_detail = "#e8e8e8"; /* detail pane text */ -/* The selected day is ringed TWICE: a dark ring outside a bright one, so - the marker 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_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 */ +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 */ +}; -/* A I-class day is marked with a BADGE, not coloured text: the badge is - filled with the cell's own foreground and the glyph drawn in its - background, so it inverts against whatever the day's colour is. Gold on - white -- the first attempt -- was very nearly invisible. */ -static const char *rank1_glyph = "I"; +/* ------------------------------------------------------------------ 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"; -enum { CELL_W = 122, CELL_H = 74, PAD = 10, HEAD_H = 46, DETAIL_H = 92 }; +/* 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"; |
