Skip to content

Keep shell colors after the Qt 6.12 update - #347

Merged
themartiano merged 2 commits into
omacom:mainfrom
gaboe:fix/qt612-shell-color
Oct 14, 2026
Merged

themartiano merged 2 commits into
omacom:mainfrom
gaboe:fix/qt612-shell-color

Conversation

@gaboe

@gaboe gaboe commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What changed and why

A normal omarchy-update on a 0.5.0 guest upgrades Qt from 6.11.2 to 6.12.0 and Quickshell from 0.3.1 to 0.3.2. Qt 6.12 adds a QtQuick/Color singleton. It shadows the shell's qs.Commons Color palette, so every Color.<role> is undefined. The bar loses its colors, and the Omarchy menu and Super+K open as a black screen. The journal shows about 220 warnings like:

Menu.qml[87]: TypeError: Cannot read property 'background' of undefined
Border.qml[25]: TypeError: Cannot read property 'menu.border-alpha' of undefined

This PR ports the upstream workaround from omacom/omarchy#14845 to the pinned 4.0.4 runtime. Each bare import QtQuick in the 102 affected shell QML files becomes import QtQuick 6.11. A versioned import does not see types added in 6.12. It also works with the Qt 6.11.2 that guests ship. The upstream commit relies on a newer Quickshell load-patch pragma, so the runtime gets the import edits directly.

There are two delivery paths:

  • New and reset VMs: a reviewed shell-qtquick-611 factory backport in guest/spec.json. It applies after the existing notification and power-menu backports.
  • Existing VMs: a shell-qtquick boot-fix component. Existing VMs keep their disk, so a factory backport alone does not reach them. The component repairs only files whose hash matches a known stock, notification, or power-menu state. It preserves user-edited files and unsafe paths. A file already pinned by hand with the same line rewrite reports current. The repair runs again after a try-omarchy-runtime reinstall. It shares one journal entry with the power-menu repair for the same file.

guest/scripts/generate-shell-qtquick-backport.py generates the patch, hashes, preimages, allowlist, and the compressed QML test fixture from the verified upstream source. A second run produces the same bytes.

Qt is not held with IgnorePkg. A hold cannot downgrade a guest that already upgraded.

Testing

  • Failing first (158dd30): the new tests in guest/tests/test_shell_qtquick.py failed for the intended reason. Examples: Factory shell still imports QtQuick without a version (102 files) and AssertionError: 'current' != None (no shell-qtquick component yet).
  • After the fix (f6ef2b3): all 7 focused tests pass. They cover the factory chain, the first and repeat boot repair (applied, then current), hand-repaired files, skipped consent, preserved custom files, composition with the power-menu repair, runtime reinstall, and interrupted-recovery rollback.
  • make test on the final commit: exit 0 (426 Swift tests, 393 guest tests).
  • git diff --check: clean.
  • An independent review traced the shipped 0.5.0 file states, power-loss recovery at three write points, path safety, and generator reproducibility. It found no issues.
  • Live, on an affected 0.5.0 VM after omarchy-update: I applied the same import rewrite by hand. Shell warnings went from 223 to 0, and the bar was themed again.

Not verified:

  • make guest did not complete. The builder fetched the verified Omarchy source. Then the build stopped because the ALARM mirror has drifted from packages.lock.json: eight packages, including KDE 6.30 → 6.31 and sqlite 3.53.4 → 3.54. This branch does not change the lock, so I left the refresh to a separate PR.
  • I did not run the boot-fix component from a newly built app on a live VM, and I made no before/after capture of the menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants