2026-09-18 09:52:38 -04:00
|
|
|
//@ pragma UseQApplication
|
|
|
|
|
|
|
|
|
|
// A harness for taking the README screenshots: the real widget, on a plain
|
|
|
|
|
// backdrop, at a known position. Not part of the shell -- run it with
|
|
|
|
|
//
|
|
|
|
|
// SHOT_JURISDICTION=rocor SHOT_DATE=2027-01-07 quickshell -p quickshell/shot.qml
|
|
|
|
|
//
|
|
|
|
|
// It sits on the overlay layer at a fixed offset so a screen grab of that
|
|
|
|
|
// rectangle is always the widget and never whatever was behind it.
|
|
|
|
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import Quickshell
|
|
|
|
|
import Quickshell.Wayland
|
2026-09-18 10:29:37 -04:00
|
|
|
import "."
|
|
|
|
|
import "modules"
|
|
|
|
|
import "services"
|
2026-09-18 09:52:38 -04:00
|
|
|
|
|
|
|
|
ShellRoot {
|
|
|
|
|
PanelWindow {
|
|
|
|
|
id: win
|
|
|
|
|
screen: Quickshell.screens[0]
|
|
|
|
|
|
|
|
|
|
WlrLayershell.layer: WlrLayer.Overlay
|
2026-09-18 10:52:56 -04:00
|
|
|
WlrLayershell.namespace: "menologion-shot"
|
2026-09-18 09:52:38 -04:00
|
|
|
exclusionMode: ExclusionMode.Ignore
|
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
|
|
anchors { top: true; left: true }
|
|
|
|
|
margins { top: 60; left: 60 }
|
|
|
|
|
|
|
|
|
|
// Fixed, so a screen grab of exactly this rectangle is exactly this
|
|
|
|
|
// window and never the desktop underneath it. The widget is shorter
|
|
|
|
|
// than this; the crop takes care of the difference.
|
|
|
|
|
implicitWidth: Config.width + 68
|
|
|
|
|
implicitHeight: 700
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
gradient: Gradient {
|
|
|
|
|
GradientStop { position: 0.0; color: "#1b2016" }
|
|
|
|
|
GradientStop { position: 1.0; color: "#0e100c" }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: body
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
anchors.topMargin: 34
|
|
|
|
|
width: Config.width
|
|
|
|
|
|
2026-09-18 10:52:56 -04:00
|
|
|
Menologion {
|
2026-09-18 09:52:38 -04:00
|
|
|
Component.onCompleted: {
|
|
|
|
|
const j = Quickshell.env("SHOT_JURISDICTION");
|
|
|
|
|
const d = Quickshell.env("SHOT_DATE");
|
|
|
|
|
if (j && j !== "") Typikon.jurisdiction = j;
|
|
|
|
|
if (d && d !== "") Typikon.forDate = d;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|