Skip to content

NTP/1 theme development ​

Choose a theme when the goal is appearance rather than new behavior. Learn the manifest, style language and option model before distributing an NTP/1 package.

Version scope: these source-level examples target v2.0.0.alpha.14. Use the Plugin SDK for current Wasm plugin authoring.

The goal is adjustable, recoverable appearance across light/dark modes without changing launcher behavior. NTP/1 combines a manifest, NSS/1, resources, and options in a .ntp ZIP or explicitly imported development directory.

Select capabilities by outcome ​

OutcomeContractAcceptance
Adjustable heading color/sizeColor/Range options and NSS token/optionImmediate application and persistence
Narrow-window layoutViewport, grid, finite layoutNo overflow; correct hit testing at both widths
Runtime/tray/Splash brandingAppearance resource slotsMode/restore/startup behavior with fallback
User-selected background/musicFile/Files/Directory and Host grantsNo unauthorized reads or authority transfer
New commands/pagesOutside themesUse an admitted Sidecar/Host extension

Read the goal and architecture guide. Themes contain no scripts; style/resource expressions cannot execute commands.

Learning route ​

  1. First theme: complete files, packaging, import, three observable options.
  2. Manifest and values: every field, nine types, defaults, versions.
  3. Control recipes: switches, sliders, segmented choices, pickers, visibility, live application.
  4. NSS/1 language: selectors, cascade, tokens, conditions, responsive rules, rejection.
  5. Layout and motion: property reference, grids, transforms, virtual metrics, keyframes.
  6. Resources: assets, external grants, fonts, images, media.
  7. Appearance/capabilities: every appearance field, platforms, startup.
  8. Testing/publication: directory workflow, reproducible package, rollback, evidence.
  9. Cookbook/troubleshooting: turn appearance goals into testable changes.

Two continuing examples ​

examples/themes/twilight has no external resource dependency. examples/themes/workshop demonstrates all nine option kinds, major controls, conditional visibility, a packaged background, and authorized media selection. Media starts disabled; selecting a path is not automatic authority or playback.

Both use real ThemePackageService admission and the NSS compiler. Native image/font/audio output requires target-platform evidence; the portable lab does not claim native-window validation.

Compatibility ​

This guide targets A14 style API 1. Theme versions are independent of 2.0.0.alpha.14. Capability names are more stable than individual Host keys, but selectors still need validation against the target launcher. Missing required capabilities reject activation; optional capabilities require fallback.

Implementation references ​

Check your result ​

Follow the first-theme tutorial and verify one option survives restart.

Site documentation: CC BY-SA 4.0. Imported SDK documents: Apache-2.0 as marked.