Repository navigation
feat(theme): support qtengine as a Qt platform theme - #3019
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds qtengine as an additional supported Qt platform theme option, integrating it into both the UI and the matugen/doctor tooling so Qt5/Qt6 apps can pick up the generated KDE .colors scheme and icon theme consistently.
Changes:
- Adds qtengine config syncing (atomic JSON merge/write) and a
dms matugen qtenginesubcommand to trigger it. - Updates Settings UI + search index to expose
matugenTemplateQtengine, adjust guidance strings, and treatQT_QPA_PLATFORMTHEME=qtengineas valid. - Extends
dms doctorwith a Qt plugin-path based check to verify the qtengine platformtheme plugin is installed where Qt actually searches.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| quickshell/translations/settings_search_index.json | Adds a searchable settings entry for the new qtengine template toggle. |
| quickshell/Modules/Settings/ThemeColorsTab.qml | Adds qtengine template toggle row and updates missing-env-var/help text to include qtengine. |
| quickshell/Common/Theme.qml | Updates template skipping to include qtengine and extends “Apply Qt Colors” to also sync qtengine config. |
| quickshell/Common/SettingsData.qml | Adds qtengineActive detection, new matugenTemplateQtengine setting, and icon-theme sync hook for qtengine. |
| quickshell/Common/settings/SettingsSpec.js | Registers matugenTemplateQtengine with default true. |
| core/internal/matugen/qtengine.go | Implements qtengine config merge + atomic write and env-var detection helpers. |
| core/internal/matugen/matugen.go | Hooks qtengine sync into generation flow and adds qtengine detection entry for UI template detection. |
| core/internal/matugen/matugen_test.go | Adds unit tests for qtengine env detection, config merge semantics, mtime bumping, and template detection entry. |
| core/cmd/dms/commands_matugen.go | Adds dms matugen qtengine command + flags to run the sync directly. |
| core/cmd/dms/commands_doctor.go | Adds qtengine plugin install verification based on Qt-reported plugin paths. |
| core/cmd/dms/commands_doctor_test.go | Adds focused tests for robust Qt query output parsing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+36
to
+38
| func SyncQtengineConfig(configDir, iconTheme string) error { | ||
| path := QtengineConfigPath(configDir) | ||
|
|
qtengine is a single platform theme plugin serving both Qt5 and Qt6 from one JSON config, so it needs neither the qt5ct/qt6ct split nor qt6ct-kde. It reads a KDE .colors scheme by path, which the kcolorscheme template already generates, so no new matugen template is required. DMS now merges theme.colorScheme and theme.iconTheme into $XDG_CONFIG_HOME/qtengine/config.json after each generate, on icon theme changes, and from Apply Qt Colors. The merge preserves every other key,refuses to touch a config it cannot parse, and only names a color scheme that exists. The write is atomic, and its mtime bump is what trips qtengine's watcher and repaints running apps. QT_QPA_PLATFORMTHEME=qtengine is accepted without the missing-env-var toast, Apply Qt Colors no longer fails on a machine without qt5ct or qt6ct, and dms doctor reports whether the plugin is installed where Qt actually searches, per Qt major.
bbedward
force-pushed
the
qtengine-platform-theme
branch
from
August 17, 2026 17:17
6db61b4 to
c83a92e
Compare
by-architect
pushed a commit
to by-architect/Phoenix
that referenced
this pull request
Aug 19, 2026
* feat(theme): support qtengine as a Qt platform theme qtengine is a single platform theme plugin serving both Qt5 and Qt6 from one JSON config, so it needs neither the qt5ct/qt6ct split nor qt6ct-kde. It reads a KDE .colors scheme by path, which the kcolorscheme template already generates, so no new matugen template is required. DMS now merges theme.colorScheme and theme.iconTheme into $XDG_CONFIG_HOME/qtengine/config.json after each generate, on icon theme changes, and from Apply Qt Colors. The merge preserves every other key,refuses to touch a config it cannot parse, and only names a color scheme that exists. The write is atomic, and its mtime bump is what trips qtengine's watcher and repaints running apps. QT_QPA_PLATFORMTHEME=qtengine is accepted without the missing-env-var toast, Apply Qt Colors no longer fails on a machine without qt5ct or qt6ct, and dms doctor reports whether the plugin is installed where Qt actually searches, per Qt major. * fix(theme): resolve qtengine config via XDG, tighten doctor probing --------- Co-authored-by: bbedward <[email protected]>
marcusramberg
pushed a commit
to marcusramberg/DankMaterialShell
that referenced
this pull request
Sep 2, 2026
* feat(theme): support qtengine as a Qt platform theme qtengine is a single platform theme plugin serving both Qt5 and Qt6 from one JSON config, so it needs neither the qt5ct/qt6ct split nor qt6ct-kde. It reads a KDE .colors scheme by path, which the kcolorscheme template already generates, so no new matugen template is required. DMS now merges theme.colorScheme and theme.iconTheme into $XDG_CONFIG_HOME/qtengine/config.json after each generate, on icon theme changes, and from Apply Qt Colors. The merge preserves every other key,refuses to touch a config it cannot parse, and only names a color scheme that exists. The write is atomic, and its mtime bump is what trips qtengine's watcher and repaints running apps. QT_QPA_PLATFORMTHEME=qtengine is accepted without the missing-env-var toast, Apply Qt Colors no longer fails on a machine without qt5ct or qt6ct, and dms doctor reports whether the plugin is installed where Qt actually searches, per Qt major. * fix(theme): resolve qtengine config via XDG, tighten doctor probing --------- Co-authored-by: bbedward <[email protected]>
5 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds qtengine as a supported Qt platform theme alongside
qt5ct,qt6ctandgtk3.Both existing Qt6 options have problems.
qt6cthas multiple unfixedQMenusize/position bugs filed against the trialuser/qt6ct fork, and the AURqt6ct-kdepackage the settings UI recommends builds from that same fork.gtk3only half-themes: DMS's GTK template writes libadwaita variable names (window_bg_color,accent_bg_color, …) and none of the classictheme_bg_color/theme_fg_colornames the gtk3 platform theme reads, so Qt6 apps get dark mode and icons but never the matugen accent.qtengine serves both Qt5 and Qt6 from one JSON config and reads a KDE
.colorsscheme by path — which thekcolorschemetemplate already generates, so no new matugen template is needed.theme.colorSchemeandtheme.iconThemeinto$XDG_CONFIG_HOME/qtengine/config.jsonafter each generation, on icon-theme changes, and from Apply Qt Colors. Preservesstyle,font,fontFixed,miscand unknown keys; refuses a config it can't parse; only names a scheme that exists. The write is atomic, and its mtime bump is what repaints running appsQT_QPA_PLATFORMTHEME=qtenginein the missing-env-var guard, and rewords three copy sites so the qt6ct-kde caveat attaches to qt6ct rather than reading as a blanket Qt requirementscripts/qt.shexits 1 without qt5ct or qt6ct so the button always failed.qt.shis unchangeddms doctorcheck that asksqmake/qtpathswhere Qt looks for plugins, per Qt major. A file system search would report OK on the packaging bug it exists to catch, where the Qt5 plugin lands under a prefix Qt5 doesn't searchmatugenTemplateQtenginesetting, defaulttruelike its siblingsEvery write path is gated on
QT_QPA_PLATFORMTHEME/_QT6being exactlyqtengine, and Qt never auto-selects a platform-theme plugin, so users on anything else see no new files and no behavior change.Validation
Measured on Arch,
qtengine0.2.1, Qt 5.15.19 and 6.11.1. A QApplication built offscreen under each binding, reading the resulting QPalette:239,239,239239,239,239qtengine15,20,23qtengine15,20,2315,20,23is exactlyColors:Window/BackgroundNormalfrom the generated.colorsfile.The merge against a handwritten config with
style, both font blocks,miscand an unknown top-level key is key-order-canonicalized, so only real changes show:"theme": { - "colorScheme": "~/.local/share/color-schemes/SomeOtherScheme.colors", + "colorScheme": "/home/user/.local/share/color-schemes/DankMatugen.colors", "font": { "family": "Cantarell", "size": 10, "weight": -1 }, "fontFixed": { "family": "CaskaydiaCove Nerd Font Mono", "size": 9, "weight": -1 }, - "iconTheme": "breeze-dark", + "iconTheme": "Papirus-Dark", "style": "Fusion" }--skip-templates qtengineandQT_QPA_PLATFORMTHEME=gtk3: nothing written, noqtengine/directory createdokfor Qt5 and Qt6 here,warnfor Qt5 against a tree replicating the AUR layout without the workaround symlinkstyle/fonts/miscuntouched in my real configmake fmt,go mod tidy,make test,make build,make lint-qml,GOOS=freebsd go build ./...Known limitations: Go sorts map keys, so a handwritten config is alphabetized once on first write.
os.Renamereplaces a symlinkedconfig.jsonwith a regular file, which is deliberate — an in-place truncate risks qtengine reading a half-written file. AndbuildOnce()returns early when the palette is unchanged, so re-applying an identical color won't recreate a deleted config; the icon-theme path and Apply Qt Colors both run unconditionally and cover that.One thing to flag about this change itself: I write the qtengine config to
opts.ConfigDir, which makes it the only writer ininternal/matugenthat honours--config-dir. Everything else resolves through the XDG helpers (substituteVarsfor all template output, plusconfigDirExistsandrefreshQt6ct) soopts.ConfigDiris otherwise a read-only path and--config-dirdoesn't actually redirect anything. I went with the flag's stated meaning, but happy to switch toutils.XDGConfigHome()for consistency if you'd rather keep the two aligned.Type of change
Related issues
None.
Screenshots / video
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings