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
+22
-22
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Install (or remove) the Moon Plasma login session. Run as root, once:
|
||||
"""Install (or remove) the Chandra login session. Run as root, once:
|
||||
|
||||
run0 python3 session/install.py # install: the compositor as a wasm component
|
||||
run0 python3 session/install.py --link # dev: symlink into this checkout (see below)
|
||||
@@ -11,13 +11,13 @@ checkout, so after one root install, `just compositor-wasm host-wasm modules` is
|
||||
next login to run your latest build (no root, no reinstall). The checkout must stay where it is.
|
||||
|
||||
Installs:
|
||||
/usr/local/bin/moon-plasma-host wasmtime host that runs the compositor component
|
||||
/usr/local/share/moon-plasma/compositor.wasm the compositor, as a WebAssembly component
|
||||
/usr/local/bin/moon-plasma (--native) release native compositor binary
|
||||
/usr/local/bin/moon-plasma-session session launcher (starts the host if installed)
|
||||
/usr/local/share/moon-plasma/{config,wit,assets}/ files the compositor reads at runtime
|
||||
/usr/local/share/moon-plasma/modules/*.wasm the panel's wasm modules (build them first: just modules)
|
||||
/usr/share/wayland-sessions/moon-plasma.desktop display-manager entry
|
||||
/usr/local/bin/chandra-host wasmtime host that runs the compositor component
|
||||
/usr/local/share/chandra/compositor.wasm the compositor, as a WebAssembly component
|
||||
/usr/local/bin/chandra (--native) release native compositor binary
|
||||
/usr/local/bin/chandra-session session launcher (starts the host if installed)
|
||||
/usr/local/share/chandra/{config,wit,assets}/ files the compositor reads at runtime
|
||||
/usr/local/share/chandra/modules/*.wasm the panel's wasm modules (build them first: just modules)
|
||||
/usr/share/wayland-sessions/chandra.desktop display-manager entry
|
||||
"""
|
||||
import os, shutil, sys
|
||||
|
||||
@@ -25,14 +25,14 @@ root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
native = "--native" in sys.argv
|
||||
linked = "--link" in sys.argv
|
||||
exe = os.path.join(root, "_build/native/release/build/compositor/bin/bin.exe")
|
||||
host = os.path.join(root, "host-wasm/target/release/moon-plasma-host")
|
||||
host = os.path.join(root, "host-wasm/target/release/chandra-host")
|
||||
component = os.path.join(root, "build/compositor.wasm")
|
||||
share = "/usr/local/share/moon-plasma"
|
||||
share = "/usr/local/share/chandra"
|
||||
targets = [
|
||||
"/usr/local/bin/moon-plasma",
|
||||
"/usr/local/bin/moon-plasma-host",
|
||||
"/usr/local/bin/moon-plasma-session",
|
||||
"/usr/share/wayland-sessions/moon-plasma.desktop",
|
||||
"/usr/local/bin/chandra",
|
||||
"/usr/local/bin/chandra-host",
|
||||
"/usr/local/bin/chandra-session",
|
||||
"/usr/share/wayland-sessions/chandra.desktop",
|
||||
]
|
||||
|
||||
if "--remove" in sys.argv:
|
||||
@@ -80,17 +80,17 @@ def drop(path):
|
||||
|
||||
install = link if linked else (lambda src, dst: put(src, dst, 0o755 if "/bin/" in dst else 0o644))
|
||||
if native:
|
||||
install(exe, "/usr/local/bin/moon-plasma")
|
||||
drop("/usr/local/bin/moon-plasma-host") # the launcher falls back to the native binary
|
||||
install(exe, "/usr/local/bin/chandra")
|
||||
drop("/usr/local/bin/chandra-host") # the launcher falls back to the native binary
|
||||
else:
|
||||
install(host, "/usr/local/bin/moon-plasma-host")
|
||||
drop("/usr/local/bin/moon-plasma")
|
||||
install(host, "/usr/local/bin/chandra-host")
|
||||
drop("/usr/local/bin/chandra")
|
||||
os.makedirs(share, exist_ok=True)
|
||||
if not native:
|
||||
install(component, os.path.join(share, "compositor.wasm"))
|
||||
install(os.path.join(root, "session/moon-plasma-session"), "/usr/local/bin/moon-plasma-session")
|
||||
install(os.path.join(root, "session/chandra-session"), "/usr/local/bin/chandra-session")
|
||||
# The display-manager entry stays a real file: some managers don't follow symlinks there.
|
||||
put(os.path.join(root, "session/moon-plasma.desktop"), "/usr/share/wayland-sessions/moon-plasma.desktop", 0o644)
|
||||
put(os.path.join(root, "session/chandra.desktop"), "/usr/share/wayland-sessions/chandra.desktop", 0o644)
|
||||
# Read at runtime relative to the working directory (the launcher cd's here): the Interface Explorer
|
||||
# shows wit/, the theme comes from config/, and assets/fonts holds the Allo font.
|
||||
for d in ("config", "wit", "assets"):
|
||||
@@ -106,7 +106,7 @@ mods = os.path.join(root, "build/components")
|
||||
dst = os.path.join(share, "modules")
|
||||
if linked:
|
||||
link(mods, dst)
|
||||
print("done: pick 'Moon Plasma' in the session menu; rebuild with `just compositor-wasm host-wasm modules`")
|
||||
print("done: pick 'Chandra' in the session menu; rebuild with `just compositor-wasm host-wasm modules`")
|
||||
sys.exit(0)
|
||||
if os.path.lexists(dst):
|
||||
shutil.rmtree(dst) if os.path.isdir(dst) and not os.path.islink(dst) else os.remove(dst)
|
||||
@@ -119,4 +119,4 @@ for f in sorted(os.listdir(mods)) if os.path.isdir(mods) else []:
|
||||
if n == 0:
|
||||
sys.exit("no modules in build/components - run `just modules` first")
|
||||
print("installed", n, "modules in", dst)
|
||||
print("done: pick 'Moon Plasma' in the session menu of your login screen")
|
||||
print("done: pick 'Chandra' in the session menu of your login screen")
|
||||
Reference in new issue
Block a user