Plugin dev guide: qmllint step fails on stock Omarchy (not on PATH) and -I $OMARCHY_PATH/shell does not resolve qs.* imports
The validation step in the plugin guide (https://plugins.omarchy.org/develop.html) runs:
qmllint -I "$OMARCHY_PATH/shell" "$PLUGIN_DIR/BarWidget.qml" "$PLUGIN_DIR/Panel.qml"
It has two problems on a stock Omarchy 4.0.4 install:
1. qmllint: command not found
Arch's qt6-declarative (6.11.2) installs qmllint only to /usr/lib/qt6/bin/qmllint. That directory isn't on PATH, and the package ships /usr/bin symlinks only for qml6, qmlls6, qmlscene6, qmlpreview6 and qmleasing6, not for qmllint or qmlformat. Omarchy doesn't add /usr/lib/qt6/bin to PATH either.
2. The import path doesn't resolve qs.*, so the check passes without checking anything
With the full binary path, the command exits 0, but every Omarchy import fails:
Warning: BarWidget.qml:3:1: Failed to import qs.Ui. Are your import paths set up properly? [import]
Warning: BarWidget.qml:60:3: WidgetButton was not found ...
Warning: Panel.qml:3:1: Failed to import qs.Commons ...
The modules are declared as module qs.Ui / module qs.Commons in their qmldir files, so qmllint looks for <importpath>/qs/Ui/qmldir. $OMARCHY_PATH/shell has Ui/ and Commons/ directly and no qs/ directory. Quickshell maps qs to the shell root at runtime, but qmllint doesn't know about that. The result is around 26 warnings for the guide's own example, including bogus [inheritance-cycle] (BarWidget -> BarWidget) and [unqualified] warnings on Style.*. Because the exit code is still 0, "Both commands should exit without an error" looks like a pass even though the imports were never checked.
Even with imports resolved, the guide's own pattern leaves [missing-property] warnings, because Loader.item is QObject, Ui/Panel.qml declares property QtObject bar, and Commons/Style.qml declares property QtObject font. Omarchy's built-in clock plugin gets the same warnings.
Workaround
mkdir -p /tmp/qs-imports && ln -sfn "$OMARCHY_PATH/shell" /tmp/qs-imports/qs
/usr/lib/qt6/bin/qmllint -I /tmp/qs-imports --missing-property info \
"$PLUGIN_DIR/BarWidget.qml" "$PLUGIN_DIR/Panel.qml"
This gives 0 warnings on a correct plugin and still catches real mistakes: a misspelled property such as tooltipTxt: is reported as [missing-property], and Stlye.space(8) is reported as [unqualified]. Add -W 0 to make any warning fail the run. (--missing-property disable is too broad; it hides misspelled properties.)
Suggested fix
- Use
/usr/lib/qt6/bin/qmllintin the guide, or list adding it to PATH as a prerequisite. - Fix the import path so
qs.*resolves, for example with theqssymlink above. - Or have
omarchy plugin validaterun qmllint itself with the correct binary and import directory.
Great write-up. The workaround (symlinking the shell root as qs/ and calling /usr/lib/qt6/bin/qmllint) is exactly what the guide should say. One question: the plugin guide lives on plugins.omarchy.org, so is its source in this repo or the plugins site repo? If it's here, a small helper like omarchy-dev-qmllint that sets up the qs import path would keep the guide from going stale.
Thanks for the detailed report. Both problems check out against the current packages and source. In qt6-declarative 6.12.0, qmllint only ships at /usr/lib/qt6/bin/qmllint and gets no /usr/bin symlink. shell/Ui/qmldir and shell/Commons/qmldir declare module qs.Ui and module qs.Commons, but nothing under $OMARCHY_PATH/shell gives qmllint a qs/ directory to resolve them against.
To answer @jandrusk's question: the guide is not in this repository. quattro has no qmllint reference anywhere, and omarchy plugin validate (bin/omarchy-plugin-validate) only checks the manifest and folder layout, not the QML. The page at plugins.omarchy.org/develop.html comes from the marketplace site, whose Contribute link points to omacom/omarchy-plugin-marketplace. A fix to the guide's command would land there. Making omarchy plugin validate run qmllint with the right binary and import path, your third suggestion, would be a new feature here.
Claude Opus 5.5 and Codex (medium effort) classified this issue separately. Claude read it as a fix needed in another repository's docs, and Codex read it as documentation, so it has no class label for now. Nothing was run on a worker, because there is no code in this repository to change. Where the guide fix goes and whether omarchy plugin validate should lint QML are decisions for the maintainer.