CI / test (push) Failing after 15s
- New optional WIT export `chandra:desktop/module-config` (wit/plasmoid.wit): config-items (key,
label, choices, current value; no choices = an on/off switch) and set-config. Hosts look it up
by name, so modules without it (or prebuilt ones like Pulse) load as before.
- Right-click a panel module: "Module settings..." (or a greyed "No module settings"), then
"System settings..." (the settings module, Session tab), then Replace with... and Remove widget.
The "Modules..." row is gone; right-clicking empty panel space offers "System settings..." on the
Panel tab instead. Module settings open in the same menu: on/off rows with a check box, choices
under a heading with the current one ticked; clicking applies at once and the menu stays open.
- Choices are saved per module id in state.edn as :module-config {"clock-digital" {"format"
"12-hour"}} (module_config.mbt; not an owned key, so save_state keeps it) and handed back through
set-config whenever the module is loaded. Other instances of the module follow a change.
- Both hosts: wasmer stub (optional exports 8-10, canonical-ABI decoding in wasm_native.mbt) and
host-wasm (chandra:host/plasmoids config-items/set-config, bound with a separate `configurable`
world so the export stays optional).
- Adopted by the digital clock (Time format 24-hour/12-hour, Show date) and the binary clock (Show
seconds); clock-widget now exports module-config.
- Tests: native menu end-to-end (open, pick 12-hour, heading inert, reload keeps it), state.edn
round trip, EDN unit test, wasmer and host-wasm module-config tests, lib/clock settings test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hjuApkJR4sVRYDpDLy
99 lines
2.1 KiB
Plaintext
99 lines
2.1 KiB
Plaintext
package chandra:desktop@0.1.0;
|
|
|
|
/// Minimum every widget gets: theme tokens. Everything else is opt-in.
|
|
world widget {
|
|
import theme;
|
|
export plasmoid;
|
|
}
|
|
|
|
world clock-widget {
|
|
include widget;
|
|
import clock;
|
|
export module-config;
|
|
}
|
|
|
|
/// The optional `module-config` export on its own. A module of any world may add it to get its own
|
|
/// settings in its right-click menu; hosts look it up separately (host-wasm binds it with this world).
|
|
world configurable {
|
|
export module-config;
|
|
}
|
|
|
|
world launcher-widget {
|
|
include widget;
|
|
import app-catalog;
|
|
import app-launch;
|
|
}
|
|
|
|
world panel {
|
|
import theme;
|
|
export panel-layout;
|
|
}
|
|
|
|
/// Reference shell: panel + desktop background in one component.
|
|
world shell {
|
|
import theme;
|
|
export desktop-surface;
|
|
export panel-layout;
|
|
}
|
|
|
|
/// Desktop Pulse: reads machine state and the window list, and can raise a window.
|
|
world pulse-widget {
|
|
include widget;
|
|
import system;
|
|
import windows;
|
|
}
|
|
|
|
/// Panel task list: needs the window list.
|
|
world taskbar-widget {
|
|
include widget;
|
|
import windows;
|
|
import icons;
|
|
}
|
|
|
|
/// Layout switcher.
|
|
world layout-widget {
|
|
include widget;
|
|
import layout-control;
|
|
}
|
|
|
|
/// Interface Explorer toggle.
|
|
world inspector-widget {
|
|
include widget;
|
|
import inspector;
|
|
}
|
|
|
|
/// Everything a panel module can be granted. The native host instantiates any module against this
|
|
/// one world (a module simply imports the subset it uses) and serves each import from the data the
|
|
/// compositor publishes (wit/host/plasmoids.wit).
|
|
world plasmoid-host {
|
|
import theme;
|
|
import clock;
|
|
import app-catalog;
|
|
import app-launch;
|
|
import windows;
|
|
import layout-control;
|
|
import inspector;
|
|
import modules;
|
|
import system;
|
|
import session;
|
|
import wallpaper;
|
|
import session-settings;
|
|
import icons;
|
|
export plasmoid;
|
|
}
|
|
|
|
/// Logout button.
|
|
world logout-widget {
|
|
include widget;
|
|
import session;
|
|
}
|
|
|
|
/// The settings module: session switches (restore, window places, dark mode), the wallpaper, and
|
|
/// the panel's modules (load, unload, browse); the panel menu's "Modules..." opens that tab.
|
|
world session-settings-widget {
|
|
include widget;
|
|
import session-settings;
|
|
import wallpaper;
|
|
import modules;
|
|
}
|