Compositor
MoonRock
An OpenGL compositor and window manager. Spatial desktop. Windows persist their positions across sessions.
- Native X11 via XLibre. Wayland clients run in the same session; both ecosystems coexist without picking sides.
- Written in C. Built with Meson. 2D rendering via Cairo and Pango. Compositing via OpenGL through GLX with custom GLSL shaders.
- Owns window chrome: title bars, shadows, decorations, traffic-light state. Applications draw only into their content surface.
- Routes input from the system input daemon to the focused surface. Applications never see raw evdev.
- Hosts the MoonBase IPC endpoint at
$XDG_RUNTIME_DIR/moonbase.sock(mode0600, peer-credential checked against the session UID).
Source: github.com/kyleblizzard/MoonRock
Application framework
MoonBase
The runtime, framework, and sandbox every application links against.
- Distributed as
libmoonbase.so.1insideMoonBase.framework; always provided by the OS, never vendored by an app. - Two sandbox tiers:
nativeandwebview. No third tier. No path skips the sandbox. - Every app process starts under
bwrap --unshare-all --die-with-parent --new-sessionwith a seccomp filter applied. Filesystem, network, devices, and IPC are deny-by-default. - Entitlements declared in
Info.appcdescribe what the app needs (e.g.hardware:camera,network:outbound:*); the sandbox decides how that translates into bwrap flags and seccomp edits. - Consent is lazy: a declared entitlement does not grant access on its own. First use opens a native consent sheet; the grant persists if the user allows it.
- IPC to MoonRock uses one protocol on one socket:
AF_UNIX SOCK_STREAM, length-prefixed CBOR frames, big-endian framing, integer-keyed maps, 1 MiB maximum frame. - Hosts the theme engine: system-wide and per-app theming. Applications adapt to the host DE’s theme conventions when launched off CopyCat OS.
Application bundle
CopyCat.app
One application bundle for every Linux distribution. Develop once, launch everywhere.
- Single-file on-disk layout:
[stub] [squashfs] [trailer]. Static ELF stub at the head, squashfs image appended, trailer at EOF. - Double-clicking dispatches to
moonbase-launch, which reads the trailer, mounts the squashfs at$XDG_RUNTIME_DIR/moonbase/mounts/<bundle-id>-<pid>/viasquashfuse, then execs the app under bubblewrap. - Inside the bundle:
Contents/Info.appc(TOML manifest, max 64 KiB), the executable underContents/CopyCatOS/,Contents/Resources/AppIcon.icnswith localized.lprojdirectories, and optionallyContents/Frameworks/for vendored shared libraries. - Apps integrate with MoonRock, MoonBase, and the theme engine at runtime. Those layers are always provided by the OS, never vendored inside the bundle.
- On CopyCat OS, the app inherits the system theme by default and can declare a per-app override. On any other Linux desktop environment, the app adapts to the host DE’s theme conventions instead.
- Shipping
.appfiles carry the application icon as an extended attribute on the file itself. The file viewer, dock, search, and desktop icons render the real icon without mounting the squashfs. - No installation step. No package manager. No PPA. The file is the app; deleting it removes the app entirely. Email it to a friend; they double-click and it runs.
Gaming
Built for handheld play
GameScope-ready, with the desktop session optimized for the Steam Deck and the Lenovo Legion Go.
- Games hand off from MoonRock to GameScope for fullscreen play. Fixed-refresh scanout, HDR passthrough, integer scaling, and per-game resolution overrides.
- Hardware-aware: gamepad bindings, performance and TDP profiles, and DPI/scale presets tuned for 7-inch and 8-inch handheld displays.
- Touchscreen-first input paths in the shell. Controls account for thumbs, not just cursors.
- Clean handoff back to the spatial desktop session when the game exits. No compositor reset. No orphaned windows.