Publish and Install Themes
You share a theme on GitHub, in a registry, or both. Users add a GitHub theme with one command. The add copies the files into the themes folder of the user, and the user owns the copy.
- GitHub: users add your theme with
github:<owner>/<repo> - Registries: a static
registry.jsonfile lists your themes - You own the copy: edit it, then use
diffandupdateto merge upstream changes
Publish on GitHub
Repository Layout
Put the theme folder at the root of the repository:
Release
- Check the theme:
aivoryd theme check .
- Make the release archive:
aivoryd theme pack .
The command writes harbor-1.0.0.aivory-theme.zip and prints its SHA-256.
- Make a Git tag that is equal to the version in
theme.toml, with avin front, for examplev1.0.0. - Make a GitHub release for the tag.
- Attach the
.aivory-theme.zipfile to the release. - Add the topic
aivory-themeto the repository, so that users can find it.
previews/desktop.png (1440x900) in the repository. Make it with demo data only. Never show real session content in a preview.
Licenses
- Set an SPDX license in
theme.toml, for exampleMIT. - Put a
LICENSEfile next to each font and image folder. Use fonts that you can share, for example fonts with the OFL license. - The validator rejects a font or an image without a license file.
Publish in a Registry
A registry is one static file registry.json plus one archive for each theme. You host them on GitHub, GitHub Pages or any HTTPS server.
Build the Registry
- Add
registry.tomlto your theme repository. It names the base URL where you publish the archives, and the theme folders:
name = "Mine"
base_url = "https://example.com/dl"
[[item]]
path = "themes/harbor"
Each [[item]] can also have title, preview and requires.
- Build the registry:
aivoryd registry build .
The command checks each theme. It writes registry.json and one archive for each theme into the folder dist. Use --out <OUT> to choose another folder. It puts the SHA-256 of each archive in the index.
- Publish the files of
distat the base URL, for example as GitHub release assets or on GitHub Pages.
Add a Theme
Add a theme from GitHub (the latest release, or a tag):
aivoryd theme add github:janedoe/aivory-theme-harbor
aivoryd theme add github:janedoe/[email protected]
The daemon downloads the archive, checks it and the theme, and copies the files into your themes folder. It records the source, the version and the hashes in theme.lock.
You can also add a theme in the desktop app:
- Open Settings > Display.
- Paste a GitHub link into the field.
- Read the name, the author, the license, the size and the hash in the dialog.
- Confirm the add.
Use Other Registries
aivoryd registry add @someone https://someone.github.io/aivory/registry.json
aivoryd registry list
aivoryd registry remove @someone
aivoryd registry list shows the registries and their items.
Change, Compare and Update
You own the copy of each theme. Edit it in the themes folder, or copy an installed theme to your own folder with aivoryd theme init my-theme --from <id>. The built-in looks are compiled into the app, so --from works for installed themes only.
| Command | What it does |
|---|---|
aivoryd theme list |
shows your themes, their source, version and local changes |
aivoryd theme diff <id> |
shows your edits and the upstream changes |
aivoryd theme update <id> |
updates your copy at file level; a file that you edited stays |
aivoryd theme remove <id> |
removes the theme; the app uses Minimal if it was the current theme |
If your edit and an upstream change touch the same part of a file, update keeps your file and writes the upstream file next to it as <file>.upstream. Merge the two files, then delete the .upstream file.
Safety
- A theme contains no scripts. It has no network, file or clipboard access.
- A theme reads only the session data that the app gives to all screens. It can only call the actions of the app, and only when you click or press a key.
- The service checks each theme when you add it, when you update it and each time it loads it.
- The service downloads only on your command, and only over HTTPS. The same version with another hash is an error.
- Settings > Display always works. You can always go back to Minimal.