Rename the project to Chandra
CI / test (push) Failing after 16s

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:
VandClaude Opus 5.5 committed 2026-11-25 17:12:57 +00:00
1 parent 5dfe34027b
commit af774d76fe
323 files changed
+1055 -1013

No files matched your search

+27 -11
View File
@@ -2,7 +2,7 @@
/// while the compositor runs, the capabilities (host data + requests) they use, the
/// right-click menu, and the saved panel layout.
///
/// A module is a wasm plasmoid component (`moonplasma:desktop/plasmoid`). Its imports
/// A module is a wasm plasmoid component (`chandra:desktop/plasmoid`). Its imports
/// are the capabilities it was granted: `theme` and `clock` always, `app-catalog` /
/// `app-launch` for the application menu, `windows` for the task list, `layout-control`
/// for the layout switcher, `inspector` for the Interface Explorer button and `modules`
@@ -20,7 +20,7 @@ let manager_module : String = "module-manager"
///| Directories searched for `*.wasm` modules, highest priority first.
fn module_dirs() -> Array[String] {
let dirs : Array[String] = []
let env = @sys.getenv("MOON_PLASMA_MODULES")
let env = @sys.getenv("CHANDRA_MODULES")
if env.length() > 0 {
for d in env.split(":") {
if d.length() > 0 {
@@ -32,10 +32,10 @@ fn module_dirs() -> Array[String] {
let x = @sys.getenv("XDG_DATA_HOME")
if x.length() > 0 { x } else { @sys.getenv("HOME") + "/.local/share" }
}
dirs.push(data_home + "/moon-plasma/modules")
dirs.push("/usr/local/share/moon-plasma/modules")
dirs.push("/usr/share/moon-plasma/modules")
dirs.push("modules") // the login session runs from /usr/local/share/moon-plasma
dirs.push(data_home + "/chandra/modules")
dirs.push("/usr/local/share/chandra/modules")
dirs.push("/usr/share/chandra/modules")
dirs.push("modules") // the login session runs from /usr/local/share/chandra
// In a source checkout (and from a package directory when running its tests).
dirs.push("build/components")
dirs.push("../build/components")
@@ -693,11 +693,27 @@ fn clamp_menu(v : Int, lo : Int, hi : Int) -> Int {
// ---------------------------------------------------------------- saved panel
///| Panel config lives in $XDG_CONFIG_HOME/moon-plasma/panel.edn (default ~/.config).
///| Panel config lives in $XDG_CONFIG_HOME/chandra/panel.edn (default ~/.config).
fn panel_config_dir() -> String {
config_base() + "/chandra"
}
///|
fn config_base() -> String {
let c = @sys.getenv("XDG_CONFIG_HOME")
(if c.length() > 0 { c } else { @sys.getenv("HOME") + "/.config" }) +
"/moon-plasma"
if c.length() > 0 { c } else { @sys.getenv("HOME") + "/.config" }
}
///| Read a saved config file. Before the rename to Chandra it lived under
/// $XDG_CONFIG_HOME/moon-plasma; fall back to that when there is no new copy yet
/// (the next save writes it to the new place).
fn read_config_file(name : String) -> Bytes {
let b = @sys.read_file_bytes(panel_config_dir() + "/" + name)
if b.length() > 0 {
b
} else {
@sys.read_file_bytes(config_base() + "/moon-plasma/" + name)
}
}
///| Write the loaded modules, in panel order, as EDN:
@@ -708,7 +724,7 @@ pub fn DesktopShell::save_panel_config(self : DesktopShell) -> Unit {
return
}
let sb = StringBuilder::new()
sb.write_string(";; Moon Plasma panel: the wasm modules loaded into it, in order\n")
sb.write_string(";; Chandra panel: the wasm modules loaded into it, in order\n")
sb.write_string("{:panel [")
let mut first = true
for w in self.widgets {
@@ -730,7 +746,7 @@ fn DesktopShell::load_panel_config(self : DesktopShell) -> Array[String]? {
if !self.persist {
return None
}
let text = @utf8.decode_lossy(@sys.read_file_bytes(panel_config_dir() + "/panel.edn"))
let text = @utf8.decode_lossy(read_config_file("panel.edn"))
let lines : Array[String] = []
for l in text.split("\n") {
if !l.trim(chars=" \t\r").to_string().has_prefix(";") {