mirror of
https://git.pumpin.online/funkpower/menologion.git
synced 2026-10-22 18:57:14 +00:00
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.
48 lines
1.3 KiB
QML
48 lines
1.3 KiB
QML
//@ pragma UseQApplication
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell
|
|
import Quickshell.Wayland
|
|
import qs
|
|
import qs.modules
|
|
import qs.services
|
|
|
|
// A runnable widget on its own — `quickshell -p quickshell/shell.qml`.
|
|
//
|
|
// It sits on the background layer, so it behaves like part of the wallpaper:
|
|
// always under your windows, never stealing a click. Drop the Horologion
|
|
// component into an existing shell instead if you already have one.
|
|
ShellRoot {
|
|
Variants {
|
|
model: Quickshell.screens
|
|
|
|
PanelWindow {
|
|
required property var modelData
|
|
screen: modelData
|
|
|
|
WlrLayershell.layer: WlrLayer.Background
|
|
WlrLayershell.namespace: "horologion"
|
|
exclusionMode: ExclusionMode.Ignore
|
|
color: "transparent"
|
|
|
|
anchors { top: true; right: true }
|
|
margins { top: 24; right: 24 }
|
|
|
|
implicitWidth: Config.width
|
|
implicitHeight: content.implicitHeight
|
|
|
|
ColumnLayout {
|
|
id: content
|
|
anchors.fill: parent
|
|
|
|
Horologion {
|
|
// Leave empty to follow `typikon --set-default`, or name a
|
|
// jurisdiction here: "rocor", "antiochian", "oca", ...
|
|
Component.onCompleted: Typikon.jurisdiction = ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|