Files
menologion/quickshell/modules/Panel.qml
T
funkpower 92b2efbd51 desktop front ends for typikon
A Quickshell widget for Hyprland, a waybar module and an eww panel, all
reading the same JSON from the typikon CLI so none of them touches the
network and all three agree.

The Quickshell piece is three separable parts: a Typikon singleton that
wraps the CLI and re-reads only when the date rolls over, a Theme singleton
that takes colours from JSON with a default for every key, and the widget
itself.

The legend is built from the week in view rather than hardcoded, because the
levels a tradition uses are its own -- six under the Typikon, three under
Ruthenian particular law -- and the words for them differ too. The church
date shows beside the civil one whenever they differ, which on the old
calendar is always. Forefeasts and afterfeasts get their own line instead of
crowding out the commemoration that makes the day.
2026-09-18 09:17:14 -04:00

55 lines
1.4 KiB
QML

import QtQuick
import QtQuick.Layouts
import qs
import qs.services
// Chrome for the widget. Slightly translucent so a wallpaper reads through it,
// opaque enough to stay legible over a busy picture.
Rectangle {
id: root
property string title: ""
property string note: ""
default property alias content: body.data
Layout.fillWidth: true
implicitHeight: col.implicitHeight + 28
radius: Config.radius
color: Qt.alpha(Theme.surface, Config.opacity)
border.width: 1
border.color: Qt.alpha(Theme.overlay, 0.7)
ColumnLayout {
id: col
anchors.fill: parent
anchors.margins: 14
spacing: 10
RowLayout {
Layout.fillWidth: true
visible: root.title !== ""
Text {
Layout.fillWidth: true
text: root.title
color: Theme.accent
font.family: Config.font
font.pixelSize: Config.fontSize
font.bold: true
}
Text {
text: root.note
color: Theme.fgDim
font.family: Config.font
font.pixelSize: Config.fontSize - 2
}
}
Item {
id: body
Layout.fillWidth: true
implicitHeight: children.length > 0 ? children[0].implicitHeight : 0
onWidthChanged: if (children.length > 0) children[0].width = width
}
}
}