Files
chandra/wit/worlds.wit
T
Claude ae48cc5bf4
CI / test (push) Failing after 2m56s
Applications menu and Icon Desktop: show each app's .desktop icon
The launcher's rows drew a letter circle and the Icon Desktop fell back to
letter tiles for every app that wasn't in the dock: the shell only published
icons for windows' and dock apps. publish_icons now also covers the rows the
open Applications menu lists (only those, so opening it looks up a handful of
icons) and every catalog app when the desktop module imports icons. Lookups
are the dock's (theme chain, absolute Icon= paths, PNG on the native host,
SVG too on the wasm host, generic app icon, then the letter tile) and cached
per id; an unchanged icons table is no longer re-sent every frame.

launcher-widget imports icons; the JS host has an icons stub (always 0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hkhaM5djqPXPQNs7QR
2026-11-26 01:56:01 +00:00

171 lines
4.7 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;
}
/// The optional `desktop-module` export on its own (wit/desktop.wit): what makes a module a
/// desktop module. Hosts look it up by name like `module-config` (host-wasm binds this world).
world desktop-export {
export desktop-module;
}
/// The application launcher. The launcher's popup
/// also ends in a session row: Reload, Log out, Suspend, Restart, Power off.
world launcher-widget {
include widget;
import app-catalog;
import app-launch;
import icons;
import session;
import power;
}
/// The dock: pinned apps plus running ones, with their theme icons, a dot per open window, a click
/// that starts the app or brings its windows forward, and right-click settings (icon size,
/// magnification, running apps). The shell keeps the pinned list (hidden `pinned` setting) and
/// draws the per-app right-click menu (Pin, Move, Quit), sharing lib/dock's layout.
world dock-widget {
include widget;
import app-catalog;
import app-launch;
import windows;
import icons;
export module-config;
}
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;
}
/// 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;
import screenshot;
import power;
import battery;
import network;
import shortcuts;
import default-apps;
import face-unlock;
export plasmoid;
}
/// The settings module: session switches (restore, window places, dark mode), the wallpaper, the
/// panel's modules (load, unload, browse; the panel menu's "Modules..." opens that tab), and power
/// (idle timeouts, battery, suspend / restart / power off), keyboard shortcuts (rebind, reset),
/// default apps (browser, email, files, terminal, editor, viewers and players) and face unlock.
world session-settings-widget {
include widget;
import session-settings;
import wallpaper;
import modules;
import power;
import system;
import shortcuts;
import default-apps;
import face-unlock;
}
/// Screenshot and screen recording launcher.
world screenshot-widget {
include widget;
import screenshot;
}
/// Battery charge, charging state and time left in the panel; its right-click settings choose what
/// shows.
world battery-widget {
include widget;
import battery;
export module-config;
}
/// Network status (Ethernet, Wi-Fi name and signal, offline) and a popup to pick a Wi-Fi network,
/// connect, disconnect, and switch Wi-Fi or airplane mode.
world network-widget {
include widget;
import network;
}
/// A desktop module (wit/desktop.wit): a plasmoid drawn full screen behind the windows. The
/// minimum: theme tokens in, draw ops and input, the animation clock.
world desktop-widget {
include widget;
export desktop-module;
}
/// Sample desktop module: app icons on the desktop. Click one to start the app, drag it to
/// arrange the grid (positions are kept as a hidden setting); arrow keys, Enter and typing pick
/// one. Its settings choose how many apps and how big.
world icon-desktop-widget {
include desktop-widget;
import app-catalog;
import app-launch;
import icons;
export module-config;
}
/// Sample desktop module: an animated starfield replacing the wallpaper. The pointer steers it,
/// the wheel changes speed, a click sends a warp pulse; it animates at 30 frames a second and
/// sleeps when its settings say Still.
world starfield-widget {
include desktop-widget;
export module-config;
}