mirror of
https://git.pumpin.online/funkpower/menologion.git
synced 2026-10-23 03:07:12 +00:00
the documented way to use this did not work
`import qs.horologion.modules` was the README's headline instruction and it
fails outright: Quickshell resolves `qs` against the host config root, not
the subtree, so in an empty shell the type is unavailable and in a populated
one the widget would have silently bound to the host's Config and Theme
instead of its own. The imports inside are now relative and each directory
carries a qmldir, so `import "horologion/modules"` works in any host and the
three pieces really are usable on their own.
- refresh() dropped a request made while a run was in flight, so a
jurisdiction or date set a moment after startup never took effect until
midnight. It queues now.
- The waybar script exited non-zero on its error paths, and waybar hides a
module whose script does that -- so a missing typikon made the module
vanish rather than say so, and the .error CSS was dead. An unrecognised
--format field raised instead of rendering empty, and the tooltip
interpolated unescaped text into Pango markup, which matters because
--update-menaion fetches commemorations from a page nobody here controls.
- The installer aborted the whole run at the point where it printed
'leaving it alone', and a wholly successful run exited 1 because the last
statement was a failed [ -d ] test under set -e. --help demanded typikon,
which is what --help would have told you to install.
- eww painted every day with the feast colour and printed a dangling
separator, because it compares against "" and eww renders a JSON null as
the string "null". The parenthesised ?: form two lines away was already
right. The week list also repeated today.
pip install typikon installed nothing; there is no such package, and that was
the first line of every install path. Pascha now carries its label instead of
being a bare ISO date in a corner.
tests/smoke.sh covers the scripts, which is where all of this lived and where
nothing was covered. It caught two of these while being written.
This commit is contained in:
+9
-6
@@ -5,8 +5,9 @@
|
||||
;; (include "horologion/horologion.yuck")
|
||||
;;
|
||||
;; and put (horologion) in a window, or (horologion-bar) in a bar. Set a
|
||||
;; jurisdiction by editing the two defpoll commands below; leaving them as
|
||||
;; they are follows whatever `typikon --set-default` wrote.
|
||||
;; jurisdiction by adding `--jurisdiction <name>` to both defpoll commands
|
||||
;; below; leaving them as they are follows whatever `typikon --set-default`
|
||||
;; wrote.
|
||||
|
||||
(defpoll typikon-day
|
||||
:interval "30m"
|
||||
@@ -16,7 +17,9 @@
|
||||
(defpoll typikon-week
|
||||
:interval "30m"
|
||||
:initial "{\"days\":[]}"
|
||||
`typikon --json --days 7`)
|
||||
;; From tomorrow, not today: the head block above already shows today in
|
||||
;; full, and simplexpr has no way to drop the first element of a list.
|
||||
`typikon --json --days 6 --date $(date -d tomorrow +%F)`)
|
||||
|
||||
;; ── the one-line version, for a bar
|
||||
(defwidget horologion-bar []
|
||||
@@ -38,7 +41,7 @@
|
||||
(box :class "head" :space-evenly false :spacing 11
|
||||
(label :class "glyph-big" :text {typikon-day.emoji ?: ""})
|
||||
(box :orientation "v" :space-evenly false :halign "start" :hexpand true
|
||||
(label :class {typikon-day.feast != "" ? "title feast" : "title"}
|
||||
(label :class {(typikon-day.feast ?: "") != "" ? "title feast" : "title"}
|
||||
:halign "start"
|
||||
:wrap true
|
||||
:lines 2
|
||||
@@ -47,7 +50,7 @@
|
||||
? "sub obligatory" : "sub"}
|
||||
:halign "start"
|
||||
:text "${typikon-day.weekday ?: ""}${
|
||||
typikon-day.season != "" ? " · " : ""}${
|
||||
(typikon-day.season ?: "") != "" ? " · " : ""}${
|
||||
typikon-day.season ?: ""}${
|
||||
typikon-day.obligation == "obligatory"
|
||||
? " · obligatory" : ""}")
|
||||
@@ -70,7 +73,7 @@
|
||||
(box :space-evenly false :spacing 9
|
||||
(label :class "glyph" :text {d.emoji})
|
||||
(label :class "weekday" :width 34 :xalign 0 :text {d.weekday})
|
||||
(label :class {d.feast != "" ? "day feast" : "day"}
|
||||
(label :class {(d.feast ?: "") != "" ? "day feast" : "day"}
|
||||
:hexpand true :xalign 0 :limit-width 40 :text {d.title}))))
|
||||
|
||||
(box :class "rule")
|
||||
|
||||
Reference in New Issue
Block a user