What a theme can and cannot do
The honest boundary of the format, worth reading before you plan something it cannot do, and before you install something you did not write.
A theme is a document. It describes pages, elements and the formulas that give them their values. It is not a program, and the difference is not a matter of degree.
It cannot#
- Run code. There is no scripting. The formula language evaluates an expression to a value; it has no loops, no functions of your own, and no way to reach anything the launcher does not hand it.
- Reach the network on its own. It can name a picture to load and read the feeds and weather the reader has already configured. It cannot make a request of its own, send anything anywhere, or talk to a server you run.
- Read anything private. No files, no messages, no clipboard, no browsing history. What it sees is the list of installed apps, the notification counts if the reader granted access, and the values on the variables page.
- Remember anything. Variables live as long as the launcher process. After a restart they are back to the theme's declared starting values: no counters, no "seen this", no settings of its own. See variables of your own.
- Ship a font or an arbitrary icon set.
fontFamilypicks from what the system has. Pictures travel in a bundle; glyphs come from the built-in icon set or from an icon pack, which is its own listing. - Take a permission. Notification access, location for the weather: the reader grants those to the launcher, once. A theme can ask, by drawing a row that opens the permission screen, and that is all.
- Shut the door behind itself. A theme owns the gesture that opens the launcher options, and a theme that offers none makes them unreachable from the home screen. The same options stay open as a full screen from the launcher's entry in the app list and from App settings in the system app info screen, which is how a reader switches away from a theme that trapped them. Authors should still leave a way back in.
It can#
Everything the element reference lists, driven by anything on the variables page, on pages wired together however you like. In practice that is a wider space than it sounds: a list that filters itself as a finger moves down an alphabet, a feed page that folds a card open on a tap, a dock that changes with the time of day. All of that is positions and conditions.
Where a theme feels like it wants to store something or fetch something, the answer is usually a rearrangement: state that a tap writes, a value the launcher already provides, or an element that appears under a condition.
What that means for installing one#
Because a theme cannot execute anything, installing one from a stranger is a much smaller decision than installing an app. The one thing it can do to the outside world is ask the launcher to open an address or start an app, and that is exactly what is filtered for a theme you did not write, and asked about when a theme wants more. See installing and browsing.
Sharing without the store#
A theme exports as a file: plain .json, or a .zip bundle when it carries its own pictures. Send it however you send files. The person opening it gets the same trust prompt as for anything else that did not come from their own device. A theme from a friend is treated exactly like a theme from a stranger, which is the only way that boundary means anything.
Publishing to the store instead gets you version history, screenshots rendered from the theme itself, and review. See publishing a theme.
Documentation for launcher 0.1.0-alpha Android 12 and later last updated