Files
menologion/README.md
T

159 lines
4.9 KiB
Markdown
Raw Normal View History

2026-09-18 10:52:56 -04:00
# menologion
2026-09-18 09:17:14 -04:00
2026-09-18 10:52:56 -04:00
Desktop front ends for [`typikon`](https://git.pumpin.online/funkpower/typikon).
The Orthodox liturgical day on your desktop, in Hyprland (Quickshell), waybar
or eww.
2026-09-18 09:17:14 -04:00
Everything is computed locally by `typikon`, so none of this touches the
2026-09-18 10:52:56 -04:00
network, and the widget re-reads only when the date rolls over. The answer
2026-09-18 09:17:14 -04:00
changes at midnight and at no other moment.
![The widget during the Nativity Fast](docs/nativity-fast.png)
2026-09-18 09:17:14 -04:00
## Install
`typikon` first, since all three front ends shell out to it. It is one static
binary with the calendar compiled in, so there is no runtime to install and no
data file to find:
2026-09-18 09:17:14 -04:00
```console
$ cargo install --git https://git.pumpin.online/funkpower/typikon
2026-09-18 09:17:14 -04:00
$ typikon --set-default rocor # or antiochian, oca, greece, ...
```
`typikon --list` has every jurisdiction. A Byzantine Catholic will usually want
`--typikon` on that line too, which shows the day at the full Byzantine
discipline rather than at the smaller minimum particular law requires:
```console
$ typikon --set-default ruthenian --typikon
```
2026-09-18 09:17:14 -04:00
Then:
```console
2026-09-18 10:52:56 -04:00
$ git clone https://git.pumpin.online/funkpower/menologion
$ cd menologion && ./bin/menologion-install
2026-09-18 09:17:14 -04:00
```
That links rather than copies, so `git pull` updates what you are running. Pass
`quickshell`, `waybar`, `eww` or `bin` to do just one.
## Quickshell
A desktop widget for Hyprland and anything else Quickshell runs on.
```console
2026-09-18 10:52:56 -04:00
$ quickshell -p ~/.config/quickshell/menologion/shell.qml
2026-09-18 09:17:14 -04:00
```
2026-09-18 10:52:56 -04:00
It sits on the background layer, so it behaves like part of the wallpaper:
2026-09-18 09:17:14 -04:00
always under your windows, never stealing a click.
2026-09-18 10:29:37 -04:00
To drop it into a shell you already have, link this directory in beside your
own and import it by path:
2026-09-18 09:17:14 -04:00
```qml
2026-09-18 10:52:56 -04:00
import "menologion/modules"
2026-09-18 09:17:14 -04:00
2026-09-18 10:52:56 -04:00
Menologion {}
2026-09-18 09:17:14 -04:00
```
2026-09-18 10:29:37 -04:00
The imports inside are relative, so the widget always resolves its own
`Config` and `Theme` rather than silently binding to yours and inheriting
whatever they happen to mean.
2026-09-18 09:17:14 -04:00
Three pieces, each usable on its own:
| | |
|---|---|
2026-09-18 10:52:56 -04:00
| `services/Typikon.qml` | a singleton wrapping the CLI; bind to it from anything |
2026-09-18 09:17:14 -04:00
| `services/Theme.qml` | colours, from JSON, with defaults for every key |
2026-09-18 10:52:56 -04:00
| `modules/Menologion.qml` | the widget |
2026-09-18 09:17:14 -04:00
Set a jurisdiction per-widget if you want one different from your default:
```qml
2026-09-18 10:52:56 -04:00
import "menologion/services" // for Typikon
2026-09-18 10:29:37 -04:00
2026-09-18 10:52:56 -04:00
Menologion {
2026-09-18 09:17:14 -04:00
Component.onCompleted: Typikon.jurisdiction = "moscow"
}
```
2026-09-18 10:29:37 -04:00
`Typikon.forDate` takes an ISO date and shows a different day, which is how
you look at what Great Week will ask of you before it arrives. `Typikon.days`
sets how far ahead the week list runs.
Anything not set here follows whatever `typikon --set-default` remembered,
including the discipline, so the widget and a terminal on the same machine
agree.
2026-09-18 10:29:37 -04:00
2026-09-18 09:17:14 -04:00
### Colours
2026-09-18 10:52:56 -04:00
`Theme.qml` reads `~/.config/menologion/colors.json`, or whatever
`MENOLOGION_COLORS` points at, and watches it for changes. Every key has a
2026-09-18 09:17:14 -04:00
default, so the widget is legible with no file at all. See
2026-09-18 10:52:56 -04:00
`quickshell/colors.example.json`, the flat shape most theme generators
2026-09-18 09:17:14 -04:00
already emit.
## waybar
```jsonc
"custom/typikon": {
2026-09-18 10:52:56 -04:00
"exec": "menologion-waybar",
2026-09-18 09:17:14 -04:00
"return-type": "json",
"interval": 1800,
"on-click": "typikon --days 7"
}
```
2026-09-18 10:52:56 -04:00
The module's CSS class is the fast level (`.xerophagy`, `.wine_oil`, `.fish`), so a day's discipline reads off the colour without reading the text.
2026-09-18 09:17:14 -04:00
`.obligatory` is added only where a particular law actually binds, which under
the Typikon is never: the Orthodox Church keeps the fast as tradition, not as
precept. `waybar/style.css` has a starting palette.
Change what the text says with `--format`:
```console
2026-09-18 10:52:56 -04:00
$ menologion-waybar --format '{emoji} {fastLabel}'
$ menologion-waybar -j moscow --format '{emoji} {churchDate}'
2026-09-18 09:17:14 -04:00
```
## eww
```lisp
2026-09-18 10:52:56 -04:00
(include "menologion/menologion.yuck")
2026-09-18 09:17:14 -04:00
```
2026-09-18 10:52:56 -04:00
Then `(menologion)` for the full panel or `(menologion-bar)` for one line.
`menologion.scss` carries the styling; its colours are `!default` variables, so
2026-09-18 09:17:14 -04:00
set your own before the `@import`.
## What it shows
The feast or the day's principal commemoration, the fast and why, the season,
the week ahead, and Pascha.
**The church date is always in the corner.** On the new calendar it echoes the
wall calendar; on the old it is the answer you came for. Below, ROCOR on 7
2026-09-18 10:52:56 -04:00
January, which is 25 December, and the Nativity.
2026-09-18 09:17:14 -04:00
![The Nativity on the old calendar](docs/old-calendar.png)
2026-09-18 09:17:14 -04:00
**Forefeasts, afterfeasts and leave-takings** get their own quiet line rather
than crowding out the commemoration that makes the day itself. They repeat for
days at a time, and a widget that leads with "Post-festive Day of the
Exaltation" for a week has told you nothing.
**The legend is built from the week in view**, not hardcoded, because the
2026-09-18 10:52:56 -04:00
levels a tradition uses are its own: six under the Typikon, three under
Ruthenian particular law, and the words for them differ too. Great Week uses
nearly all of them:
![Great and Holy Week](docs/great-week.png)
2026-09-18 09:17:14 -04:00
## Licence
2026-09-18 10:52:56 -04:00
GPL-2.0-only. See [LICENSE](LICENSE).