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.
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.
ocean/
theme.json
styles.css # optional
code.js # optional
preview.png # optional
| File | Required | Purpose |
|---|---|---|
theme.json | Yes | Theme identity, modes, variants, tokens and parameters |
styles.css | No | Presentation-only CSS, applied CSP-safely |
code.js | No | Optional theme code; sandboxed by default |
preview.png | No | Real 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
{
"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
- Open Settings → Display → Themes.
- Choose Install theme and select the
.jsonor.zippackage. - Review the validation report. An invalid token, duplicate id or unknown parameter is rejected.
- Select the theme, switch light/dark and test every parameter control.
- Check a narrow window, long app titles, reduced motion and a high-contrast display.
- Uninstall or reset to verify the shell returns to a built-in theme cleanly.
Code, sandbox and full access
| Runtime | What it can do | Trust |
|---|---|---|
| No code | Tokens, CSS and parameters only | No extra consent |
| Sandboxed code | Draw inside an isolated layer | Sandboxed by default |
| Shell code | Legacy full-access module API | Explicit 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
| Symptom | Likely cause | Fix |
|---|---|---|
| Unknown token | Parameter or token not in the contract | Use a declared token or add the role to the contract |
| Duplicate theme id | Another installed theme has the same id | Use a stable unique id |
| Invalid mode | Mode not in light / dark | Declare supported modes only |
| Preview missing | No sibling preview image | Optional; omit or add a real preview |
| Theme looks incomplete | Required base roles omitted | Start from the base and override the roles that define the theme |
| Remote URL or network call | Theme depends on a remote font, image or request | Remove it; use system resources, tokens or local CSS |
| Code does not run | Runtime not declared or trust not granted | Review 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
- Themes overview — the four theme docs.
- Create a theme — the authoring flow.
- Tokens & parameters — the complete contract.
- Shell & UI — how the shell applies a theme.
Was this page helpful?