Desktop modules: a wasm module can fill the desktop, with Icon Desktop and Live Starfield
CI / test (push) Failing after 30s
CI / test (push) Failing after 30s
A module that exports chandra:desktop/desktop-module (wit/desktop.wit) owns the desktop behind the windows instead of a box in the panel: same sandbox, draw ops and capabilities, drawn at the output's full size and re-rendered on resize. It gets pointer and scroll events only on the empty desktop (windows, panel, popups and menus always win; a drag stays with the module until release), keys only while the desktop has focus, and can draw over the wallpaper or replace it. Its tick() asks for animation frames only while something moves; the main loop sleeps until the next one (wake_timeout), and frames pause while a window covers the desktop, so an idle desktop module costs nothing. Settings > Desktop gets "On the desktop": Wallpaper only, Clock card (default) or any installed desktop module, saved in state.edn as :desktop, loaded at login and reloaded by chandra-ctl reload. Right-click the empty desktop for Module settings and System settings. Hidden settings (empty label) are persisted by the shell, which is how Icon Desktop keeps icon positions. Samples: Icon Desktop (click to launch, drag to arrange, keyboard navigation, count and size settings) and Live Starfield (pointer steers, click or Space warps, wheel sets speed). Served by all hosts: compositor/wasm (native + MoonBit wasmhost) and Rust host-wasm. Docs in docs/desktop-modules.md; tests in compositor/host/desktop_test.mbt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgf1SwPMHVfLUbJKsB
This commit is contained in:
79 files changed
+4591
-113
No files matched your search
@@ -156,7 +156,7 @@ a recording shortcut again to stop.
|
||||
and a binary clock.
|
||||
* **Screenshot**, **Layout** (Tile | Float), **Inspector** (interface explorer).
|
||||
* **Settings**: tabs for Session (reopen windows at login, remember window positions, dark
|
||||
mode), Desktop (wallpapers), Panel (add, remove and replace modules), Power (screen off and
|
||||
mode), Desktop (what fills the desktop, wallpapers), Panel (add, remove and replace modules), Power (screen off and
|
||||
suspend when idle, battery, suspend / restart / power off), Shortcuts and Apps (the default web
|
||||
browser, email, file manager, terminal, text editor, image viewer, video and music player, PDF
|
||||
viewer and archive manager, chosen from the installed apps; written to
|
||||
@@ -165,6 +165,13 @@ a recording shortcut again to stop.
|
||||
xdg-desktop-portal's Settings color-scheme itself, so Chrome, Firefox and Electron apps follow
|
||||
the switch live (see [docs/dark-mode.md](docs/dark-mode.md)).
|
||||
|
||||
**Desktop modules**: a module can fill the desktop itself, behind the windows, instead of sitting
|
||||
in the panel. Choose one in Settings > Desktop (*Wallpaper only*, *Clock card*, or any installed
|
||||
desktop module); right-click the empty desktop for its settings. Two ship: **Icon Desktop** (app
|
||||
icons you click to launch and drag to arrange, positions remembered) and **Live Starfield** (an
|
||||
animated starfield you steer with the pointer). See
|
||||
[docs/desktop-modules.md](docs/desktop-modules.md) to write one.
|
||||
|
||||
Right-click any module for **Module settings** (its own options, such as the clock's format,
|
||||
saved in `state.edn`), **System settings**, Replace with and Remove widget. Right-clicking empty
|
||||
panel space opens System settings on the Panel tab.
|
||||
@@ -178,7 +185,7 @@ keep pixels on the host rather than copying them through the component.
|
||||
* `~/.config/chandra/panel.edn`: the panel's modules, in order.
|
||||
* `~/.config/chandra/state.edn`: layout mode, recent apps, window positions, the windows to
|
||||
reopen, wallpaper, theme, power timeouts, the terminal terminal apps run in (`:terminal`, also
|
||||
put first in `~/.config/xdg-terminals.list`), per-module settings (`:module-config`), and the
|
||||
put first in `~/.config/xdg-terminals.list`), per-module settings (`:module-config`), what fills the desktop (`:desktop`), and the
|
||||
Settings switches (`:restore-session false`, `:remember-windows false`, `:theme :light`).
|
||||
* Themes: `config/themes/moon-night.json` (default) and `moon-day.json`.
|
||||
|
||||
|
||||
Reference in new issue
Block a user