Skip to content

List third-party bar widgets that declare display modes in the Icons editor - #43

Open
monsonjeremy wants to merge 1 commit into
HANCORE-linux:mainfrom
monsonjeremy:third-party-display-modes
Open

List third-party bar widgets that declare display modes in the Icons editor#43
monsonjeremy wants to merge 1 commit into
HANCORE-linux:mainfrom
monsonjeremy:third-party-display-modes

Conversation

@monsonjeremy

Copy link
Copy Markdown

Summary

Third-party bar widgets can opt into the Control Center's Icons appearance editor by declaring the displayMode values they render:

"x-shibumi": { "displayModes": ["full", "icon", "text"] }

Today the editor builds its list from the fixed WidgetCatalog groups, so a third-party widget that already honors the displayMode setting the host injects (icon / full / text) has no tile and no way for the user to pick a mode (omarchy bar set … displayMode is overwritten by the group store). With this change:

  • ControlCenterPanel.buildPluginEntries carries a validated displayModes list per plugin (unknown values dropped; a widget that cannot render full is not listed).
  • WidgetAppearanceWorkbench adds one catalog option per enabled, declared, non-suite bar widget under its dynamic G:<plugin id> group, and the mode chooser offers only the declared modes in V2. V1 keeps such widgets at Default, matching normalizedDisplayMode in the state service. Surface/color/outline controls apply through the host slot as before.
  • Widgets without the declaration keep their original rendering and stay in Plugins, so existing behavior is unchanged.

Affected plugins: hancore.shibumi.control-center (plus docs, changelog, and tests). No state-service or bar-host changes.

Motivating widget: monsonjeremy.omachess, which declares the key and renders all three modes.

Checks

git diff --check
python3 tests/documentation-regression.py
SHIBUMI_OMARCHY_BASELINE_PROFILE=installed-source-parity \
  OMARCHY_PATH=<basecamp/omarchy checkout at f0020448> \
  ./tests/control-center-regression.sh

All pass. The smoke test now adds a flag-gated third-party fixture entry (thirdPartyAppearanceFixture on the test panel, so baseline widget counts asserted elsewhere are untouched) and asserts that a declared widget is listed with modes icon,full in V2 and Default-only in V1, and that an undeclared widget is not listed. I confirmed the new assertion fails against main without the implementation.

tests/test_shibumi_suite.py was run but its test_sandbox_update_advances_beta_7_to_beta_9 errors on my shallow clone (missing tag v0.1.1-beta.7); the other 98 tests pass and the error reproduces on an unmodified tree.

The installed-package baseline could not be used because my installed Omarchy shell drifts from the pinned package digest, hence the source-parity profile.

Live evidence and remaining gate

Widget side, on a real Wayland session (Omarchy shell + Shibumi 0.1.1-beta.11, V2 layout): writing displayMode icon / text / full into bar.shibumi.widgets["G:monsonjeremy.omachess"] renders the expected pill in each mode, which is the path this editor writes through setGroupSetting.

Not exercised live: the modified Control Center itself on a Wayland session (I did not want to overlay files onto a suite-managed install). The remaining gate is opening Icons with a declared third-party widget enabled and confirming the tile, preview glyph, mode chooser, and reset behave in both V1 and V2.

…editor

A third-party bar widget can now opt into the Control Center's Icons
appearance editor by declaring the displayMode values it renders in its
manifest: "x-shibumi": { "displayModes": ["full", "icon", "text"] }.

The plugin catalog carries the validated declaration, the workbench adds
one catalog option per declared enabled widget under its dynamic
G:<plugin id> group, and the mode chooser offers only the declared modes in
V2 (V1 stays at Default, matching the state service's normalization).
Widgets without the declaration keep their original rendering and stay in
Plugins.

Affected plugins: hancore.shibumi.control-center.
Checks: tests/control-center-regression.sh (installed-source-parity
baseline), tests/documentation-regression.py, git diff --check. The smoke
test now adds a flag-gated third-party fixture entry and asserts it is
listed with modes icon,full in V2, Default-only in V1, and that an
undeclared widget is not listed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

1 participant