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
Executable
+69
@@ -0,0 +1,69 @@
|
||||
#!/bin/sh
|
||||
# Login-session entry point for Chandra (started by the display manager).
|
||||
# Runs the compositor on the seat's display via DRM/KMS + libinput and logs to
|
||||
# ~/.local/state/chandra/session.log. By default that is the compositor as a
|
||||
# WebAssembly component, run by chandra-host; if only the native binary was installed
|
||||
# (session/install.py --native), it runs that instead.
|
||||
share=/usr/local/share/chandra
|
||||
case "$0" in /*) self="$0" ;; *) self="$PWD/$0" ;; esac # for the dbus-run-session re-exec
|
||||
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export XDG_CURRENT_DESKTOP=chandra
|
||||
export XDG_SESSION_DESKTOP=chandra
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
|
||||
mkdir -p "$HOME/.local/state/chandra"
|
||||
log="$HOME/.local/state/chandra/session.log"
|
||||
[ -n "$CHANDRA_SESSION_LOG_STARTED" ] || : >"$log"
|
||||
export CHANDRA_SESSION_LOG_STARTED=1
|
||||
|
||||
# The compositor reads wit/ and config/ relative to its working directory.
|
||||
cd "$share" || exit 1
|
||||
|
||||
sock="${XDG_RUNTIME_DIR:-/tmp}/wayland-moon-0"
|
||||
rm -f "$sock"
|
||||
|
||||
if [ -x /usr/local/bin/chandra-host ]; then
|
||||
set -- /usr/local/bin/chandra-host "$share/compositor.wasm"
|
||||
else
|
||||
set -- /usr/local/bin/chandra
|
||||
fi
|
||||
|
||||
# Session bus. Use the per-user bus (systemd's $XDG_RUNTIME_DIR/bus) when there is one: that is
|
||||
# where pam_gnome_keyring's daemon, unlocked with the login password, registers
|
||||
# org.freedesktop.secrets. A fresh dbus-run-session bus would hide it, and apps would then
|
||||
# activate a second, locked keyring daemon there (unlock prompts, "default keyring" dialogs).
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && [ -S "${XDG_RUNTIME_DIR:-/nonexistent}/bus" ]; then
|
||||
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
|
||||
fi
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && command -v dbus-run-session >/dev/null 2>&1; then
|
||||
# No bus yet (no systemd user session): start one and run this script again inside it, so the
|
||||
# environment setup below happens on that bus.
|
||||
exec dbus-run-session -- "$self"
|
||||
fi
|
||||
|
||||
# D-Bus- and systemd-activated services (gcr-prompter for keyring unlock prompts, portals,
|
||||
# notification daemons) start with the activation environment, not ours: without
|
||||
# WAYLAND_DISPLAY they can't open a window, so a keyring unlock prompt silently fails and the
|
||||
# app gets "locked collection" errors.
|
||||
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
|
||||
dbus-update-activation-environment --systemd \
|
||||
WAYLAND_DISPLAY="$(basename "$sock")" XDG_SESSION_TYPE XDG_CURRENT_DESKTOP \
|
||||
XDG_SESSION_DESKTOP >>"$log" 2>&1 ||
|
||||
dbus-update-activation-environment \
|
||||
WAYLAND_DISPLAY="$(basename "$sock")" XDG_SESSION_TYPE XDG_CURRENT_DESKTOP \
|
||||
XDG_SESSION_DESKTOP >>"$log" 2>&1 || true
|
||||
fi
|
||||
|
||||
# Hand the PAM-started keyring daemon (already unlocked by the login password) its session
|
||||
# components, so it owns org.freedesktop.secrets on our bus. Harmless if it isn't installed,
|
||||
# already running under systemd's socket units, or not unlocked by PAM (it then prompts once).
|
||||
if command -v gnome-keyring-daemon >/dev/null 2>&1; then
|
||||
eval "$(gnome-keyring-daemon --start --components=secrets 2>>"$log")"
|
||||
[ -n "$SSH_AUTH_SOCK" ] && export SSH_AUTH_SOCK
|
||||
fi
|
||||
|
||||
exec "$@" --drm --socket "$sock" \
|
||||
--theme "$share/config/themes/moon-night.json" >>"$log" 2>&1
|
||||
Reference in new issue
Block a user