Split the bar panel into one QML file per stage

Panel.qml keeps the state, the CLI calls and the stage switch (889 lines,
was 2360); each stage is its own file taking the panel as a required
property. The omarchy installer copies every QML/JS file and clears stale
ones. tests/static.sh filters qmllint on [syntax], not the word error.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
smoido
2026-09-15 02:12:49 +03:00
co-authored by Claude Opus 5
parent 4091746d4e
commit bb01418ce0
17 changed files with 1717 additions and 1510 deletions
+9 -3
View File
@@ -36,11 +36,17 @@ fi
# --- payload ---------------------------------------------------------------
mkdir -p "$DEST_DIR"
for f in manifest.json BarWidget.qml Panel.qml BrandIcon.qml Modes.js; do
for f in manifest.json BarWidget.qml Panel.qml Modes.js; do
[ -f "$SRC/$f" ] || { fail "missing from payload: $f"; exit 1; }
install -m 0644 "$SRC/$f" "$DEST_DIR/$f"
done
green 'plugin files copied'
# Every QML and JS file, not a fixed list: the panel is split into one file per
# stage. The old ones are cleared first, so a file removed from the source does
# not linger in the plugin directory, where QML would still find it by name.
rm -f "$DEST_DIR"/*.qml "$DEST_DIR"/*.js
for f in "$SRC"/manifest.json "$SRC"/*.qml "$SRC"/*.js; do
install -m 0644 "$f" "$DEST_DIR/$(basename "$f")"
done
green "plugin files copied ($(ls "$SRC"/*.qml | wc -l | tr -d ' ') QML files)"
# --- bar layout ------------------------------------------------------------
# shell.json is the user's own file and may carry unrelated customisation, so