moon-plasma / moonplasma / MoonPlasma / Moon Plasma become chandra / Chandra everywhere: the WIT package (chandra:desktop, chandra:host, chandra:wm), the MoonBit module (chandra/desktop) and generated bindings, the Rust host, identifiers (ChandraCompositor), the session script (chandra-session) and desktop entry (chandra.desktop), config and data paths ($XDG_CONFIG_HOME/chandra, share/chandra/modules), env vars (CHANDRA_*), UI strings, docs and tests. The test fixture components are rebuilt against the renamed WIT. Saved panel.edn and state.edn are still read from the old $XDG_CONFIG_HOME/moon-plasma until the first save writes the new copy. The remote repository keeps its experiments/moon-plasma name for now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hi3L9oVBoRd373Qr4n
This commit is contained in:
323 files changed
+1055
-1013
No files matched your search
@@ -0,0 +1,42 @@
|
||||
///| Implementation of `chandra:desktop/plasmoid` for the launcher.
|
||||
/// The state machine lives in lib/launcher; this adapts host capabilities.
|
||||
|
||||
///|
|
||||
let state : @logic.State = @logic.State::new()
|
||||
|
||||
///|
|
||||
pub fn info() -> PlasmoidInfo {
|
||||
{
|
||||
id: "org.chandra.launcher",
|
||||
name: "Application Launcher",
|
||||
preferred: { w: 150, h: 34 },
|
||||
min_width: 60,
|
||||
stretch: false,
|
||||
}
|
||||
}
|
||||
|
||||
///|
|
||||
pub fn render(size : @types.Size) -> Array[@types.DrawOp] {
|
||||
@logic.render_button(size, @theme.get_tokens(), state)
|
||||
}
|
||||
|
||||
///|
|
||||
pub fn popup() -> PopupSurface? {
|
||||
if !state.open {
|
||||
return None
|
||||
}
|
||||
let apps = @app_catalog.list_apps()
|
||||
Some({
|
||||
size: @logic.popup_size(apps, state),
|
||||
ops: @logic.render_popup(apps, @theme.get_tokens(), state),
|
||||
})
|
||||
}
|
||||
|
||||
///|
|
||||
pub fn on_event(target : Surface, event : @types.InputEvent) -> Bool {
|
||||
let t : @logic.Target = match target {
|
||||
WIDGET => Widget
|
||||
POPUP => Popup
|
||||
}
|
||||
@logic.handle_event(@app_catalog.list_apps(), state, t, event, @app_launch.launch)
|
||||
}
|
||||
Reference in new issue
Block a user