Files
menologion/quickshell/services/Theme.qml
T
funkpower be81c682cb horologion was the wrong book
The Horologion is the Book of Hours: the fixed portions of the services
themselves. This shows the day's commemorations, its fast and its season,
which is a Menologion. Naming it for a book whose contents it does not carry
was a real error and worth the churn to correct.

typikon already uses the word internally, for menologion.py and the data file
it loads. That is not a collision: typikon provides a menologion, this
displays one.

Renamed throughout, not just the repo: the two scripts, the QML component and
its three qmldir modules, MENOLOGION_COLORS, ~/.config/menologion/colors.json,
the eww widgets and scss variables, the waybar class. Verified standalone and
embedded in a foreign shell, and the smoke suite still passes.

Also drops the em dashes from the prose.
2026-09-18 10:52:56 -04:00

53 lines
1.5 KiB
QML

pragma Singleton
import QtQuick
import Quickshell
import Quickshell.Io
// Colours, read from a JSON file so the widget follows whatever themes the
// rest of your desktop.
//
// Every key has a default, so the widget is legible with no file at all. Point
// MENOLOGION_COLORS at your own, or drop one at the path below. The shape is
// the flat sixteen-colour kind most theme generators already emit.
Singleton {
id: root
readonly property string path: {
const env = Quickshell.env("MENOLOGION_COLORS");
return env && env !== ""
? env
: Quickshell.env("HOME") + "/.config/menologion/colors.json";
}
property var c: ({})
readonly property color bg: c.bg ?? "#1d2021"
readonly property color surface: c.surface ?? "#282828"
readonly property color overlay: c.overlay ?? "#504945"
readonly property color fg: c.fg ?? "#ebdbb2"
readonly property color fgDim: c.fgDim ?? "#a89984"
readonly property color accent: c.accent ?? "#d3869b"
readonly property color red: c.red ?? "#fb4934"
readonly property color yellow: c.yellow ?? "#fabd2f"
readonly property color green: c.green ?? "#b8bb26"
function reload() { file.reload(); load(); }
function load() {
try {
root.c = JSON.parse(file.text());
} catch (e) {
root.c = ({});
}
}
FileView {
id: file
path: root.path
watchChanges: true
onFileChanged: root.reload()
onLoaded: root.load()
}
}