From 805bde839f03d0e07ba3456ff26ccf527c8bd07a Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 12 Sep 2026 11:04:21 +0200 Subject: refactor: one Theme.qml in shared/, symlinked from each component The four copies had already drifted, which is the argument for doing this now rather than when a palette change has to be made four times and lands in three of them. vm-manager was missing surfaceAlt; volume-osd was missing green, yellow and surfaceAlt. The shared file is the superset, so the two thin ones gain properties they never had and nothing loses one. A symlink rather than a shared import path: a singleton outside the config directory needs a qmldir beside it, the same friction that already keeps the generated palette parsed rather than imported. Quickshell follows the link and resolves the singleton with no qmldir, so no consumer changes and no component stops running standalone under qs -p. All four load clean with Configuration Loaded and no QML resolution error. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01TvHeJEXJzdfAaCCYqURAWp --- AGENTS.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index 4ef879f..3a2e504 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -109,7 +109,7 @@ No component defines a palette. `udt-accent`, in the `unified-desktop-theme` repo alongside this one, writes `~/.cache/wal/udt-palette.qml` from its `palette.rasi`, carrying the whole Catppuccin Macchiato palette plus the accent snapped from the current -wallpaper. Each `Theme.qml` parses and watches that file, so a palette edit +wallpaper. `Theme.qml` parses and watches that file, so a palette edit recolours a running shell with no restart. What is left in `Theme.qml` is a fallback for before the file is read, and for @@ -120,6 +120,16 @@ The file is parsed rather than imported because a generated QML singleton cannot be imported without a `qmldir` beside it, and the wal cache has no reason to carry one. +There is one `Theme.qml`, in `shared/`, and each component holds a symlink to +it. It was four copies that had already drifted: `vm-manager` was missing +`surfaceAlt` and `volume-osd` was missing `green`, `yellow` and `surfaceAlt`, +so the shared file is the superset and the two thin ones gained properties +they never had. A symlink rather than a shared import path because a singleton +outside the config directory needs a `qmldir`, which is the same friction that +keeps the palette parsed rather than imported; quickshell follows the link and +resolves the singleton with no qmldir and no consumer change. Editing any +component's `Theme.qml` edits all four. Do not replace a link with a copy. + ## Blur Translucency is set in QML; the frosting is the compositor's. Hyprland blurs a -- cgit v1.2.3