Themes · packaging

Package and install a theme.

A theme package is a JSON document or a ZIP with theme.json at its root. Styling is data; code is a separate trust decision.

9 min readUpdated 26 November 2026RUI · package

Package format

The OS accepts a single .json file or a .zip with theme.json at the root or one directory deep. A ZIP may name sibling styles.css, code.js and a preview image; their contents are inlined into the installed theme.

package layout
ocean/
  theme.json
  styles.css      # optional
  code.js         # optional
  preview.png     # optional
FileRequiredPurpose
theme.jsonYesTheme identity, modes, variants, tokens and parameters
styles.cssNoPresentation-only CSS, applied CSP-safely
code.jsNoOptional theme code; sandboxed by default
preview.pngNoReal preview image shown in the gallery

Self-contained package

A theme package is self-contained by design. The files in the package are inlined; there is no remote asset field. A theme that loads a remote font, image or stylesheet is not portable and not offline-safe.

theme.json

theme.json
{
  "id": "com.example.ocean",
  "name": "Ocean",
  "description": "A cool theme for dim rooms.",
  "version": "0.1.0",
  "author": "com.example",
  "modes": ["light", "dark"],
  "base": "iris",
  "variants": {
    "shellLayout": "dock",
    "launcherLayout": "springboard",
    "windowChrome": "standard"
  },
  "tokens": {
    "color.accent": "#0b6ea8",
    "color.canvas.background": "#071a24",
    "color.panel.background": "#0d2733",
    "color.text.primary": "#eaf4f9",
    "shape.radius.window": "16px"
  },
  "parameters": [],
  "css": "styles.css"
}

Omitted tokens fall back to the selected base. Use a stable id; the name is display metadata, not identity.

Install and test

  1. Open Settings → Display → Themes.
  2. Choose Install theme and select the .json or .zip package.
  3. Review the validation report. An invalid token, duplicate id or unknown parameter is rejected.
  4. Select the theme, switch light/dark and test every parameter control.
  5. Check a narrow window, long app titles, reduced motion and a high-contrast display.
  6. Uninstall or reset to verify the shell returns to a built-in theme cleanly.

Code, sandbox and full access

RuntimeWhat it can doTrust
No codeTokens, CSS and parameters onlyNo extra consent
Sandboxed codeDraw inside an isolated layerSandboxed by default
Shell codeLegacy full-access module APIExplicit consent and trusted code hash

A theme that declares no runtime is treated as a shell-code theme for legacy compatibility and needs explicit consent before execution. Prefer data-only or sandboxed themes.

Validation and troubleshooting

SymptomLikely causeFix
Unknown tokenParameter or token not in the contractUse a declared token or add the role to the contract
Duplicate theme idAnother installed theme has the same idUse a stable unique id
Invalid modeMode not in light / darkDeclare supported modes only
Preview missingNo sibling preview imageOptional; omit or add a real preview
Theme looks incompleteRequired base roles omittedStart from the base and override the roles that define the theme
Remote URL or network callTheme depends on a remote font, image or requestRemove it; use system resources, tokens or local CSS
Code does not runRuntime not declared or trust not grantedReview the code and grant trust explicitly

Public distribution

The public store at store.rumahl.com lists themes in the same catalog as apps. Package downloads and updates resolve to github.com/rumahl/apps. Local installation remains for development, offline use and private themes.

Current limits

Theme certification, a support promise and theme-wide revocation rules are still missing. Uninstall removes the installed theme and its settings; export is available for local packages.

Next