Official
themes
The stock themes: presets of every colour, type size, corner and density token, chosen per light and dark mode and edited in Settings.
The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: cvg install convergence/themes@0.3.0
Permissions in 0.3.0
Files
main.ts1.2 KB
// The stock themes plugin: it sends the kernel the light and dark presets
// the user chose (`kernel/theme.set`) when it starts and again whenever its
// settings change, from Settings, from `cvg settings set`, or an edit of the
// settings file. Its own view in Settings edits the presets
// (`settings.ts`).
import * as Effect from "effect/Effect";
import * as Stream from "effect/Stream";
import { Kernel, Plugin, Settings, runPlugin } from "convergence/effect";
import { chosen, readSettings } from "./settings-model.ts";
const program = Effect.gen(function* () {
const plugin = yield* Plugin;
const kernel = yield* Kernel;
const settings = yield* Settings;
const apply = Effect.gen(function* () {
const values = readSettings(plugin.api.settings.get());
yield* kernel.call("theme.set", { light: chosen(values, "light").tokens, dark: chosen(values, "dark").tokens });
}).pipe(
// A kernel without the call (an older app) keeps its built-in look.
Effect.catch((error) => Effect.sync(() => console.warn(`themes: the theme was not applied (${error.message})`))),
);
yield* apply;
yield* Effect.forkScoped(settings.changes.pipe(Stream.runForEach(() => apply)), { startImmediately: true });
});
export const activate = runPlugin(program);Versions
| Version | Published | Plugin API | Size | Permissions | Status |
|---|---|---|---|---|---|
| 0.3.0latest | Oct 5, 2026 | >=2 <3 | 7.9 KB | 1 permission | Listed |
No comments yet.