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

+2 -2
View File
@@ -317,7 +317,7 @@ fn humanise_interface(name : String, block : Array[String]) -> Array[String] {
out
}
///| "moonplasma:desktop/theme@0.1.0;" -> "theme" (raw WIT identifier, dashes kept)
///| "chandra:desktop/theme@0.1.0;" -> "theme" (raw WIT identifier, dashes kept)
fn ref_name(s : String) -> String {
let mut r = trim(s)
if r.has_suffix(";") {
@@ -334,7 +334,7 @@ fn ref_name(s : String) -> String {
r
}
///| "moonplasma:desktop/app-catalog@0.1.0" -> "app catalog"
///| "chandra:desktop/app-catalog@0.1.0" -> "app catalog"
fn short_ref(s : String) -> String {
dashes(ref_name(s))
}
+13 -13
View File
@@ -1,20 +1,20 @@
import {
"moonbitlang/core/builtin",
"moonbitlang/core/encoding/utf8" @utf8,
"moonplasma/desktop/interface/moonplasma/desktop/types" @types,
"moonplasma/desktop/interface/moonplasma/desktop/theme" @theme,
"moonplasma/desktop/lib/ui" @ui,
"moonplasma/desktop/lib/shell" @libshell,
"moonplasma/desktop/lib/panel" @panel,
"moonplasma/desktop/lib/clock" @clock,
"moonplasma/desktop/lib/moon" @moon,
"moonplasma/desktop/lib/timefmt" @timefmt,
"moonplasma/desktop/lib/launcher" @launcher,
"moonplasma/desktop/compositor/scene" @scene,
"chandra/desktop/interface/chandra/desktop/types" @types,
"chandra/desktop/interface/chandra/desktop/theme" @theme,
"chandra/desktop/lib/ui" @ui,
"chandra/desktop/lib/shell" @libshell,
"chandra/desktop/lib/panel" @panel,
"chandra/desktop/lib/clock" @clock,
"chandra/desktop/lib/moon" @moon,
"chandra/desktop/lib/timefmt" @timefmt,
"chandra/desktop/lib/launcher" @launcher,
"chandra/desktop/compositor/scene" @scene,
"jqlssg/moonedn" @edn,
"moonplasma/desktop/compositor/sys" @sys,
"moonplasma/desktop/compositor/renderer" @renderer,
"moonplasma/desktop/compositor/wasm" @wasm,
"chandra/desktop/compositor/sys" @sys,
"chandra/desktop/compositor/renderer" @renderer,
"chandra/desktop/compositor/wasm" @wasm,
}
supported_targets = "+native+wasm"
+1 -1
View File
@@ -349,7 +349,7 @@ let max_recents : Int = 8
fn recents_path() -> String {
let c = @sys.getenv("XDG_CACHE_HOME")
(if c.length() > 0 { c } else { @sys.getenv("HOME") + "/.cache" }) +
"/moon-plasma-recent"
"/chandra-recent"
}
///|
+3 -3
View File
@@ -1,5 +1,5 @@
///| Saved state: what the desktop remembers between sessions, as EDN in
/// $XDG_CONFIG_HOME/moon-plasma/state.edn (next to panel.edn, which holds the module list):
/// $XDG_CONFIG_HOME/chandra/state.edn (next to panel.edn, which holds the module list):
///
/// {:layout :tiling ; the Tile | Float switcher: :tiling, :monocle or :floating
/// :recent ["foot" "dolphin"] ; the launcher's recently started apps, newest first
@@ -40,7 +40,7 @@ let wallpaper_keys : Array[String] = ["plasma-glow", "aurora", "starfield", "dus
///|
fn read_state_file() -> Array[(@edn.Value, @edn.Value)] {
let text = @utf8.decode_lossy(@sys.read_file_bytes(state_path()))
let text = @utf8.decode_lossy(read_config_file("state.edn"))
if text.length() == 0 {
return []
}
@@ -241,7 +241,7 @@ pub fn DesktopShell::save_state(self : DesktopShell) -> Unit {
Some(b) => {
let dir = panel_config_dir()
if @sys.mkdir_p(dir) {
let text = ";; Moon Plasma state: restored at the next start\n" + b + "\n"
let text = ";; Chandra state: restored at the next start\n" + b + "\n"
ignore(@sys.write_file_bytes(state_path(), @utf8.encode(text)))
}
}
+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(";") {