@the-inconvenience-store/themer 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 the-inconvenience-store
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,43 @@
1
- # Temporary Holding Version
1
+ # Themer
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Create one color palette and generate matching themes for **Kitty**, **Oh My Pi (OMP)**, **Yazi**, **Herdr**, **Hermes Agent**, and **Neovim**. Themer maps reusable color roles to each app’s native settings. It never installs a theme, changes app config, or reloads an app.
4
+
5
+ ## Run Themer
6
+
7
+ The first npm release is planned for `@the-inconvenience-store/themer`. Once it is published, use Node.js 24 or newer on a supported platform:
8
+
9
+ ```sh
10
+ npx @the-inconvenience-store/themer docs quickstart
11
+ ```
12
+
13
+ To use the CLI before publication, run it from the checkout with Bun 1.4.4:
14
+
15
+ ```sh
16
+ bun install --frozen-lockfile
17
+ bun src/cli.ts docs quickstart
18
+ ```
19
+
20
+ ## Build a theme
21
+
22
+ From the checkout, create a starter and build both targets into a fresh output directory:
23
+
24
+ ```sh
25
+ bun src/cli.ts new twilight
26
+ bun src/cli.ts build twilight --target kitty --target omp --out ./preview
27
+ ```
28
+
29
+ If you’re using the npm package, replace `bun src/cli.ts` in these examples with `npx @the-inconvenience-store/themer`.
30
+
31
+ `new` prints the path to the editable theme. Change its `palette` values and rebuild to preview new colors in `preview/kitty/theme.conf` and `preview/omp/theme.json`. Use a new output directory or pass `--overwrite` to replace existing artifacts.
32
+
33
+ To change how Kitty uses the colors, export its template with `bun src/cli.ts template get kitty --out ./kitty.yaml`, edit the field mappings, and build with `--target ./kitty.yaml`. The exported file contains everything needed for that target, including any output validation.
34
+
35
+ Run `template list` to see the bundled targets and `docs quickstart` for manual installation steps. For scripts and agents, `template list --json` and `build --json` produce versioned JSON; `schema theme` and `schema template` print the input schemas.
36
+
37
+ ## Release development
38
+
39
+ The local package smoke test is verified on Apple Silicon macOS. See the [release checklist](https://github.com/the-inconvenience-store/themer/blob/main/docs/RELEASE.md) for packaging, platform verification, and npm publication.
40
+
41
+ ## License
42
+
43
+ [MIT](LICENSE).
package/bin/themer.js ADDED
@@ -0,0 +1,120 @@
1
+ #!/usr/bin/env node
2
+ // Auto-generated by crust build -- do not edit
3
+ const NAME = "themer";
4
+ if (typeof process.getBuiltinModule !== "function" ||
5
+ (process.platform !== "win32" && typeof process.execve !== "function")) {
6
+ console.error("[" + NAME + "] Requires Node.js >=24 (found " + process.version + ").");
7
+ process.exit(1);
8
+ }
9
+
10
+ // Builtins come from process.getBuiltinModule (cheaper than imports) and never from
11
+ // node:process: importing it touches stdio, which leaves the shared terminal and pipes
12
+ // non-blocking for the binary after execve.
13
+ const { chmodSync, closeSync, existsSync, openSync, readSync } = process.getBuiltinModule("node:fs");
14
+ const { resolve } = process.getBuiltinModule("node:path");
15
+
16
+ const PLATFORMS = {
17
+ "darwin-arm64": {
18
+ "packagePathSegment": "themer-darwin-arm64",
19
+ "packageName": "@the-inconvenience-store/themer-darwin-arm64",
20
+ "targetAlias": "darwin-arm64",
21
+ "binaryFilename": "themer-bun-darwin-arm64"
22
+ }
23
+ };
24
+ const dir = import.meta.dirname;
25
+
26
+ function isMusl() {
27
+ // The first 2 KB of Node's ELF image hold its interpreter path (detect-libc reads the same
28
+ // span), which names its libc without the milliseconds a diagnostic report costs on every start.
29
+ try {
30
+ const fd = openSync("/proc/self/exe", "r");
31
+ const head = Buffer.alloc(2048);
32
+ const interpreter = head.toString("latin1", 0, readSync(fd, head, 0, head.length, 0));
33
+ closeSync(fd);
34
+ if (interpreter.includes("/ld-musl-")) return true;
35
+ if (interpreter.includes("/ld-linux-")) return false;
36
+ } catch {}
37
+ // Same check as Bun's own npm installer: glibc reports its version, musl does not.
38
+ try {
39
+ const report = process.report?.getReport();
40
+ if (report?.header) return report.header.glibcVersionRuntime === undefined;
41
+ } catch {}
42
+ return existsSync("/etc/alpine-release");
43
+ }
44
+
45
+ const platformKey =
46
+ `${process.platform}-${process.arch}` + (process.platform === "linux" && isMusl() ? "-musl" : "");
47
+ const target = PLATFORMS[platformKey];
48
+
49
+ if (!target) {
50
+ console.error("[" + NAME + "] Unsupported platform: " + platformKey);
51
+ console.error("[" + NAME + "] Supported platforms: darwin-arm64");
52
+ process.exit(1);
53
+ }
54
+
55
+ const candidates = [
56
+ // Hoisted install: the platform package beside this one in node_modules.
57
+ resolve(dir, "..", "..", target.packagePathSegment, "bin", target.binaryFilename),
58
+ // Nested install: the platform package under this package's node_modules.
59
+ resolve(dir, "..", "node_modules", target.packageName, "bin", target.binaryFilename),
60
+ // In place: the .crust/ tree crust build staged, before any install.
61
+ resolve(dir, "..", "..", target.targetAlias, "bin", target.binaryFilename),
62
+ ];
63
+ const binPath = candidates.find((candidate) => existsSync(candidate));
64
+
65
+ if (!binPath) {
66
+ console.error("[" + NAME + "] Missing platform package for " + platformKey);
67
+ console.error("[" + NAME + "] Tried:");
68
+ for (const candidate of candidates) console.error(" " + candidate);
69
+ console.error(
70
+ "[" + NAME + "] Reinstall dependencies on this platform and ensure optional dependencies are enabled.",
71
+ );
72
+ process.exit(1);
73
+ }
74
+
75
+ if (process.platform === "win32") {
76
+ launchWindows(binPath);
77
+ } else {
78
+ try {
79
+ chmodSync(binPath, 0o755);
80
+ } catch {
81
+ // Ignore permission adjustment failures and let execve surface real errors.
82
+ }
83
+ // Become the binary: one process, so signals and exit status reach it with no relay.
84
+ // Node ignores SIGPIPE and SIGXFSZ, and ignored signals survive execve; handled ones reset.
85
+ // Ignores Node inherited (nohup's SIGHUP) were reset at its startup, so none pass on.
86
+ process.on("SIGPIPE", () => {});
87
+ process.on("SIGXFSZ", () => {});
88
+ // Early execve versions (e.g. Node 24.0.0) default to an empty environment.
89
+ process.execve(binPath, [binPath, ...process.argv.slice(2)], process.env);
90
+ }
91
+
92
+ // Windows has no execve. Its console delivers Ctrl-C to the binary directly, and
93
+ // child.kill("SIGINT") would hard-terminate it, so SIGINT is never forwarded.
94
+ function launchWindows(binPath) {
95
+ const { spawn } = process.getBuiltinModule("node:child_process");
96
+ const child = spawn(binPath, process.argv.slice(2), { stdio: "inherit" });
97
+ const forward = (signal) => child.kill(signal);
98
+ const ignore = () => {};
99
+ process.on("SIGINT", ignore);
100
+ process.on("SIGTERM", forward);
101
+ process.on("SIGHUP", forward);
102
+ child.on("error", (error) => {
103
+ console.error("[" + NAME + "] Failed to launch binary: " + error.message);
104
+ process.exit(1);
105
+ });
106
+ child.on("exit", (code, signal) => {
107
+ process.off("SIGINT", ignore);
108
+ process.off("SIGTERM", forward);
109
+ process.off("SIGHUP", forward);
110
+ if (signal) {
111
+ try {
112
+ process.kill(process.pid, signal);
113
+ } catch {
114
+ process.exit(1);
115
+ }
116
+ return;
117
+ }
118
+ process.exit(code ?? 0);
119
+ });
120
+ }
@@ -0,0 +1,59 @@
1
+ version: 1
2
+ name: dusk
3
+ palette:
4
+ ash: '#24212B'
5
+ bark: '#353141'
6
+ shadow: '#655B70'
7
+ fog: '#A89AAA'
8
+ cream: '#E5CCD8'
9
+ white: '#F5E7EB'
10
+ red: '#E4777A'
11
+ bright-red: '#FFA09D'
12
+ green: '#A1C28F'
13
+ bright-green: '#C1DFAC'
14
+ yellow: '#DFAE71'
15
+ bright-yellow: '#FBD094'
16
+ blue: '#8FAAF9'
17
+ bright-blue: '#B6C6FF'
18
+ magenta: '#C099E4'
19
+ bright-magenta: '#DFC0FF'
20
+ cyan: '#85C7C9'
21
+ bright-cyan: '#A9E2E4'
22
+ tokens:
23
+ text.primary: '{palette.cream}'
24
+ text.muted: '{palette.fog}'
25
+ surface.default: '{palette.ash}'
26
+ surface.raised: '{palette.bark}'
27
+ border.default: '{palette.shadow}'
28
+ accent.primary: '{palette.magenta}'
29
+ focus.ring: '{tokens.accent.primary}'
30
+ selection.foreground: '{palette.white}'
31
+ selection.background: '{palette.shadow}'
32
+ status.info.foreground: '{palette.blue}'
33
+ status.success.foreground: '{palette.green}'
34
+ status.warning.foreground: '{palette.yellow}'
35
+ status.error.foreground: '{palette.red}'
36
+ diff.added.foreground: '{palette.bright-green}'
37
+ diff.removed.foreground: '{palette.bright-red}'
38
+ syntax.comment.foreground: '{palette.fog}'
39
+ syntax.string.foreground: '{palette.green}'
40
+ syntax.number.foreground: '{palette.yellow}'
41
+ syntax.keyword.foreground: '{palette.magenta}'
42
+ syntax.function.foreground: '{palette.blue}'
43
+ syntax.type.foreground: '{palette.cyan}'
44
+ terminal.ansi.normal.black: '{palette.ash}'
45
+ terminal.ansi.normal.red: '{palette.red}'
46
+ terminal.ansi.normal.green: '{palette.green}'
47
+ terminal.ansi.normal.yellow: '{palette.yellow}'
48
+ terminal.ansi.normal.blue: '{palette.blue}'
49
+ terminal.ansi.normal.magenta: '{palette.magenta}'
50
+ terminal.ansi.normal.cyan: '{palette.cyan}'
51
+ terminal.ansi.normal.white: '{palette.cream}'
52
+ terminal.ansi.bright.black: '{palette.shadow}'
53
+ terminal.ansi.bright.red: '{palette.bright-red}'
54
+ terminal.ansi.bright.green: '{palette.bright-green}'
55
+ terminal.ansi.bright.yellow: '{palette.bright-yellow}'
56
+ terminal.ansi.bright.blue: '{palette.bright-blue}'
57
+ terminal.ansi.bright.magenta: '{palette.bright-magenta}'
58
+ terminal.ansi.bright.cyan: '{palette.bright-cyan}'
59
+ terminal.ansi.bright.white: '{palette.white}'
package/package.json CHANGED
@@ -1,6 +1,28 @@
1
1
  {
2
- "name": "@the-inconvenience-store/themer",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@the-inconvenience-store/themer",
3
+ "version": "0.1.0",
4
+ "description": "Compile semantic colors into native theme files.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/the-inconvenience-store/themer.git"
9
+ },
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "engines": {
14
+ "node": ">=24"
15
+ },
16
+ "type": "module",
17
+ "files": [
18
+ "bin",
19
+ "examples",
20
+ "templates"
21
+ ],
22
+ "bin": {
23
+ "themer": "bin/themer.js"
24
+ },
25
+ "optionalDependencies": {
26
+ "@the-inconvenience-store/themer-darwin-arm64": "0.1.0"
27
+ }
28
+ }
@@ -0,0 +1,73 @@
1
+ version: 1
2
+ target: herdr
3
+ renderer: toml
4
+ artifact: theme.toml
5
+ fields:
6
+ theme:
7
+ custom:
8
+ accent: { token: accent.primary }
9
+ panel_bg: { token: surface.default }
10
+ sidebar_bg: { token: surface.default }
11
+ active_row_bg: { token: surface.raised, fallback: [surface.default] }
12
+ selection_bg:
13
+ {
14
+ token: selection.background,
15
+ fallback: [surface.raised, surface.default],
16
+ }
17
+ surface0: { token: surface.raised, fallback: [surface.default] }
18
+ surface1:
19
+ {
20
+ token: selection.background,
21
+ fallback: [surface.raised, surface.default],
22
+ }
23
+ surface_dim: { token: surface.default }
24
+ overlay0: { token: border.default, fallback: [text.muted, text.primary] }
25
+ overlay1: { token: text.muted, fallback: [text.primary] }
26
+ text: { token: text.primary }
27
+ subtext0: { token: text.muted, fallback: [text.primary] }
28
+ mauve: { token: terminal.ansi.normal.magenta, fallback: [accent.primary] }
29
+ green:
30
+ {
31
+ token: status.success.foreground,
32
+ fallback: [terminal.ansi.normal.green, accent.primary],
33
+ }
34
+ yellow:
35
+ {
36
+ token: status.warning.foreground,
37
+ fallback: [terminal.ansi.normal.yellow, accent.primary],
38
+ }
39
+ red:
40
+ {
41
+ token: status.error.foreground,
42
+ fallback: [terminal.ansi.normal.red, accent.primary],
43
+ }
44
+ blue:
45
+ {
46
+ token: status.info.foreground,
47
+ fallback: [terminal.ansi.normal.blue, accent.primary],
48
+ }
49
+ teal: { token: terminal.ansi.normal.cyan, fallback: [accent.primary] }
50
+ peach:
51
+ {
52
+ token: terminal.ansi.bright.yellow,
53
+ fallback: [status.warning.foreground, accent.primary],
54
+ }
55
+
56
+ # Herdr 0.9.5 shared UI palette overrides, not pane terminal colors.
57
+ validation:
58
+ type: object
59
+ required: [theme]
60
+ additionalProperties: false
61
+ properties:
62
+ theme:
63
+ type: object
64
+ required: [custom]
65
+ additionalProperties: false
66
+ properties:
67
+ custom:
68
+ type: object
69
+ additionalProperties: false
70
+ patternProperties:
71
+ '^(accent|panel_bg|sidebar_bg|active_row_bg|selection_bg|surface0|surface1|surface_dim|overlay0|overlay1|text|subtext0|mauve|green|yellow|red|blue|teal|peach)$':
72
+ type: string
73
+ pattern: '^#[0-9A-Fa-f]{6}$'
@@ -0,0 +1,151 @@
1
+ version: 1
2
+ target: hermes
3
+ renderer: yaml
4
+ artifact: themer.yaml
5
+ fields:
6
+ # Hermes lists skins by their internal name but opens them by filename.
7
+ name: { literal: themer }
8
+ colors:
9
+ background: { token: surface.default }
10
+ banner_border:
11
+ { token: border.default, fallback: [text.muted, text.primary] }
12
+ banner_title: { token: accent.primary, fallback: [text.primary] }
13
+ banner_accent: { token: accent.primary, fallback: [text.primary] }
14
+ banner_dim: { token: text.muted, fallback: [text.primary] }
15
+ banner_text: { token: text.primary }
16
+ ui_accent: { token: accent.primary, fallback: [text.primary] }
17
+ ui_label:
18
+ {
19
+ token: status.info.foreground,
20
+ fallback: [accent.primary, text.primary],
21
+ }
22
+ ui_ok:
23
+ {
24
+ token: status.success.foreground,
25
+ fallback: [accent.primary, text.primary],
26
+ }
27
+ ui_error:
28
+ {
29
+ token: status.error.foreground,
30
+ fallback: [accent.primary, text.primary],
31
+ }
32
+ ui_warn:
33
+ {
34
+ token: status.warning.foreground,
35
+ fallback: [accent.primary, text.primary],
36
+ }
37
+ prompt: { token: focus.ring, fallback: [accent.primary, text.primary] }
38
+ input_rule: { token: border.default, fallback: [text.muted, text.primary] }
39
+ response_border:
40
+ { token: focus.ring, fallback: [accent.primary, text.primary] }
41
+ session_label:
42
+ {
43
+ token: status.info.foreground,
44
+ fallback: [accent.primary, text.primary],
45
+ }
46
+ session_border:
47
+ { token: border.default, fallback: [text.muted, text.primary] }
48
+ status_bar_bg: { token: surface.raised, fallback: [surface.default] }
49
+ status_bar_text: { token: text.primary }
50
+ status_bar_strong: { token: accent.primary, fallback: [text.primary] }
51
+ status_bar_dim: { token: text.muted, fallback: [text.primary] }
52
+ status_bar_good:
53
+ {
54
+ token: status.success.foreground,
55
+ fallback: [accent.primary, text.primary],
56
+ }
57
+ status_bar_warn:
58
+ {
59
+ token: status.warning.foreground,
60
+ fallback: [accent.primary, text.primary],
61
+ }
62
+ status_bar_bad:
63
+ {
64
+ token: status.warning.foreground,
65
+ fallback: [accent.primary, text.primary],
66
+ }
67
+ status_bar_critical:
68
+ {
69
+ token: status.error.foreground,
70
+ fallback: [accent.primary, text.primary],
71
+ }
72
+ voice_status_bg: { token: surface.raised, fallback: [surface.default] }
73
+ selection_bg:
74
+ {
75
+ token: selection.background,
76
+ fallback: [surface.raised, surface.default],
77
+ }
78
+ completion_menu_bg: { token: surface.raised, fallback: [surface.default] }
79
+ completion_menu_current_bg:
80
+ {
81
+ token: selection.background,
82
+ fallback: [surface.raised, surface.default],
83
+ }
84
+ completion_menu_meta_bg:
85
+ { token: surface.raised, fallback: [surface.default] }
86
+ completion_menu_meta_current_bg:
87
+ {
88
+ token: selection.background,
89
+ fallback: [surface.raised, surface.default],
90
+ }
91
+ shell_dollar:
92
+ {
93
+ token: status.info.foreground,
94
+ fallback: [accent.primary, text.primary],
95
+ }
96
+ diff_added_word:
97
+ {
98
+ token: diff.added.foreground,
99
+ fallback: [status.success.foreground, text.primary],
100
+ }
101
+ diff_removed_word:
102
+ {
103
+ token: diff.removed.foreground,
104
+ fallback: [status.error.foreground, text.primary],
105
+ }
106
+
107
+ # Color keys consumed by Hermes Agent v0.23.4's CLI and TUI skin engines.
108
+ validation:
109
+ type: object
110
+ required: [name, colors]
111
+ additionalProperties: false
112
+ properties:
113
+ name: { const: themer }
114
+ colors:
115
+ type: object
116
+ propertyNames:
117
+ enum:
118
+ - background
119
+ - banner_border
120
+ - banner_title
121
+ - banner_accent
122
+ - banner_dim
123
+ - banner_text
124
+ - ui_accent
125
+ - ui_label
126
+ - ui_ok
127
+ - ui_error
128
+ - ui_warn
129
+ - prompt
130
+ - input_rule
131
+ - response_border
132
+ - session_label
133
+ - session_border
134
+ - status_bar_bg
135
+ - status_bar_text
136
+ - status_bar_strong
137
+ - status_bar_dim
138
+ - status_bar_good
139
+ - status_bar_warn
140
+ - status_bar_bad
141
+ - status_bar_critical
142
+ - voice_status_bg
143
+ - selection_bg
144
+ - completion_menu_bg
145
+ - completion_menu_current_bg
146
+ - completion_menu_meta_bg
147
+ - completion_menu_meta_current_bg
148
+ - shell_dollar
149
+ - diff_added_word
150
+ - diff_removed_word
151
+ additionalProperties: { type: string, pattern: '^#[0-9A-Fa-f]{6}$' }
@@ -0,0 +1,63 @@
1
+ version: 1
2
+ target: kitty
3
+ renderer: key-value
4
+ artifact: theme.conf
5
+ fields:
6
+ foreground: { token: text.primary }
7
+ background: { token: surface.default }
8
+ cursor: { token: accent.primary, fallback: [text.primary] }
9
+ cursor_text_color: { literal: background }
10
+ selection_foreground:
11
+ { token: selection.foreground, fallback: [text.primary] }
12
+ selection_background:
13
+ { token: selection.background, fallback: [surface.raised, surface.default] }
14
+ active_border_color:
15
+ { token: focus.ring, fallback: [accent.primary, text.primary] }
16
+ inactive_border_color:
17
+ { token: border.default, fallback: [text.muted, text.primary] }
18
+ active_tab_foreground:
19
+ { token: selection.foreground, fallback: [text.primary] }
20
+ active_tab_background:
21
+ { token: selection.background, fallback: [surface.raised, surface.default] }
22
+ inactive_tab_foreground: { token: text.muted, fallback: [text.primary] }
23
+ inactive_tab_background:
24
+ { token: surface.raised, fallback: [surface.default] }
25
+ url_color: { token: accent.primary, fallback: [text.primary] }
26
+ # ANSI order: black, red, green, yellow, blue, magenta, cyan, white.
27
+ color0: { token: terminal.ansi.normal.black }
28
+ color1: { token: terminal.ansi.normal.red }
29
+ color2: { token: terminal.ansi.normal.green }
30
+ color3: { token: terminal.ansi.normal.yellow }
31
+ color4: { token: terminal.ansi.normal.blue }
32
+ color5: { token: terminal.ansi.normal.magenta }
33
+ color6: { token: terminal.ansi.normal.cyan }
34
+ color7: { token: terminal.ansi.normal.white }
35
+ color8: { token: terminal.ansi.bright.black }
36
+ color9: { token: terminal.ansi.bright.red }
37
+ color10: { token: terminal.ansi.bright.green }
38
+ color11: { token: terminal.ansi.bright.yellow }
39
+ color12: { token: terminal.ansi.bright.blue }
40
+ color13: { token: terminal.ansi.bright.magenta }
41
+ color14: { token: terminal.ansi.bright.cyan }
42
+ color15: { token: terminal.ansi.bright.white }
43
+
44
+ # Validate theme settings without allowing unrelated Kitty directives.
45
+ validation:
46
+ type: object
47
+ additionalProperties: false
48
+ patternProperties:
49
+ '^color(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$':
50
+ $ref: '#/$defs/hex'
51
+ '^(foreground|background|url_color|(active|inactive|bell)_border_color|(active|inactive)_tab_(foreground|background))$':
52
+ $ref: '#/$defs/hex'
53
+ '^(cursor|selection_(foreground|background)|tab_bar_(background|margin_color)|visual_bell_color)$':
54
+ anyOf:
55
+ - { $ref: '#/$defs/hex' }
56
+ - { const: 'none' }
57
+ properties:
58
+ cursor_text_color:
59
+ anyOf:
60
+ - { $ref: '#/$defs/hex' }
61
+ - { const: background }
62
+ $defs:
63
+ hex: { type: string, pattern: '^#[0-9A-Fa-f]{6}$' }
@@ -0,0 +1,135 @@
1
+ version: 1
2
+ target: nvim
3
+ renderer: nvim
4
+ artifact: themer.lua
5
+ fields:
6
+ Normal:
7
+ fg: { token: text.primary }
8
+ bg: { token: surface.default }
9
+ NormalFloat:
10
+ fg: { token: text.primary }
11
+ bg: { token: surface.raised, fallback: [surface.default] }
12
+ FloatBorder:
13
+ fg: { token: border.default, fallback: [text.muted, text.primary] }
14
+ bg: { token: surface.raised, fallback: [surface.default] }
15
+ CursorLine:
16
+ bg: { token: surface.raised, fallback: [surface.default] }
17
+ LineNr:
18
+ fg: { token: text.muted, fallback: [text.primary] }
19
+ CursorLineNr:
20
+ fg: { token: accent.primary, fallback: [text.primary] }
21
+ bold: { literal: true }
22
+ Visual:
23
+ fg: { token: selection.foreground, fallback: [text.primary] }
24
+ bg:
25
+ {
26
+ token: selection.background,
27
+ fallback: [surface.raised, surface.default],
28
+ }
29
+ Search:
30
+ fg: { token: surface.default }
31
+ bg:
32
+ {
33
+ token: status.warning.foreground,
34
+ fallback: [accent.primary, text.primary],
35
+ }
36
+ IncSearch:
37
+ fg: { token: surface.default }
38
+ bg: { token: accent.primary, fallback: [text.primary] }
39
+ MatchParen:
40
+ fg: { token: accent.primary, fallback: [text.primary] }
41
+ underline: { literal: true }
42
+ Pmenu:
43
+ link: { literal: NormalFloat }
44
+ PmenuSel:
45
+ link: { literal: Visual }
46
+ StatusLine:
47
+ fg: { token: text.primary }
48
+ bg: { token: surface.raised, fallback: [surface.default] }
49
+ StatusLineNC:
50
+ fg: { token: text.muted, fallback: [text.primary] }
51
+ bg: { token: surface.default }
52
+ WinSeparator:
53
+ fg: { token: border.default, fallback: [text.muted, text.primary] }
54
+ Comment:
55
+ fg:
56
+ { token: syntax.comment.foreground, fallback: [text.muted, text.primary] }
57
+ italic: { literal: true }
58
+ String:
59
+ fg:
60
+ {
61
+ token: syntax.string.foreground,
62
+ fallback: [status.success.foreground, text.primary],
63
+ }
64
+ Constant:
65
+ fg:
66
+ {
67
+ token: syntax.number.foreground,
68
+ fallback: [status.warning.foreground, text.primary],
69
+ }
70
+ Number:
71
+ link: { literal: Constant }
72
+ Identifier:
73
+ fg: { token: text.primary }
74
+ Function:
75
+ fg:
76
+ {
77
+ token: syntax.function.foreground,
78
+ fallback: [status.info.foreground, accent.primary, text.primary],
79
+ }
80
+ Statement:
81
+ fg:
82
+ {
83
+ token: syntax.keyword.foreground,
84
+ fallback: [accent.primary, text.primary],
85
+ }
86
+ Type:
87
+ fg:
88
+ {
89
+ token: syntax.type.foreground,
90
+ fallback: [terminal.ansi.normal.cyan, accent.primary, text.primary],
91
+ }
92
+ Special:
93
+ fg: { token: status.info.foreground, fallback: [text.primary] }
94
+ DiagnosticError:
95
+ fg: { token: status.error.foreground, fallback: [text.primary] }
96
+ DiagnosticWarn:
97
+ fg: { token: status.warning.foreground, fallback: [text.primary] }
98
+ DiagnosticInfo:
99
+ fg: { token: status.info.foreground, fallback: [text.primary] }
100
+ DiagnosticHint:
101
+ fg: { token: text.muted, fallback: [text.primary] }
102
+ DiagnosticOk:
103
+ fg: { token: status.success.foreground, fallback: [text.primary] }
104
+ Added:
105
+ fg:
106
+ {
107
+ token: diff.added.foreground,
108
+ fallback: [status.success.foreground, text.primary],
109
+ }
110
+ Changed:
111
+ fg: { token: status.info.foreground, fallback: [text.primary] }
112
+ Removed:
113
+ fg:
114
+ {
115
+ token: diff.removed.foreground,
116
+ fallback: [status.error.foreground, text.primary],
117
+ }
118
+ validation:
119
+ type: object
120
+ required: [Normal]
121
+ propertyNames: { pattern: '^[A-Za-z0-9_.@-]+$' }
122
+ properties:
123
+ Normal: { $ref: '#/definitions/highlight' }
124
+ additionalProperties: { $ref: '#/definitions/highlight' }
125
+ definitions:
126
+ highlight:
127
+ type: object
128
+ properties:
129
+ fg: { $ref: '#/definitions/color' }
130
+ bg: { $ref: '#/definitions/color' }
131
+ bold: { type: boolean }
132
+ italic: { type: boolean }
133
+ underline: { type: boolean }
134
+ link: { type: string, minLength: 1 }
135
+ color: { type: string, pattern: '^#[0-9A-Fa-f]{6}$' }
@@ -0,0 +1,194 @@
1
+ version: 1
2
+ target: omp
3
+ renderer: json
4
+ artifact: theme.json
5
+ fields:
6
+ name: { metadata: name }
7
+ colors:
8
+ accent: { token: accent.primary }
9
+ border: { token: border.default, fallback: [text.muted, text.primary] }
10
+ borderAccent: { token: focus.ring, fallback: [accent.primary] }
11
+ borderMuted: { token: border.default, fallback: [text.muted, text.primary] }
12
+ success: { token: status.success.foreground, fallback: [accent.primary] }
13
+ error: { token: status.error.foreground, fallback: [accent.primary] }
14
+ warning: { token: status.warning.foreground, fallback: [accent.primary] }
15
+ muted: { token: text.muted, fallback: [text.primary] }
16
+ dim: { token: text.muted, fallback: [text.primary] }
17
+ text: { token: text.primary }
18
+ thinkingText: { token: text.primary }
19
+ selectedBg:
20
+ {
21
+ token: selection.background,
22
+ fallback: [surface.raised, surface.default],
23
+ }
24
+ userMessageBg: { literal: '' }
25
+ customMessageBg: { literal: '' }
26
+ toolPendingBg: { literal: '' }
27
+ toolSuccessBg: { literal: '' }
28
+ toolErrorBg: { literal: '' }
29
+ statusLineBg: { token: surface.raised, fallback: [surface.default] }
30
+ userMessageText: { token: text.primary }
31
+ customMessageText: { token: text.primary }
32
+ customMessageLabel: { token: text.primary }
33
+ toolTitle: { token: text.primary }
34
+ toolOutput: { token: text.primary }
35
+ mdHeading: { token: accent.primary }
36
+ mdLink: { token: accent.primary }
37
+ mdLinkUrl: { token: accent.primary }
38
+ mdCode: { token: text.primary }
39
+ mdCodeBlock: { token: text.primary }
40
+ mdCodeBlockBorder: { token: text.primary }
41
+ mdQuote: { token: text.primary }
42
+ mdQuoteBorder: { token: text.primary }
43
+ mdHr: { token: text.primary }
44
+ mdListBullet: { token: text.primary }
45
+ toolDiffAdded:
46
+ {
47
+ token: diff.added.foreground,
48
+ fallback: [status.success.foreground, accent.primary],
49
+ }
50
+ toolDiffRemoved:
51
+ {
52
+ token: diff.removed.foreground,
53
+ fallback: [status.error.foreground, accent.primary],
54
+ }
55
+ toolDiffContext: { token: text.primary }
56
+ syntaxComment: { token: text.primary }
57
+ syntaxKeyword: { token: accent.primary }
58
+ syntaxFunction: { token: accent.primary }
59
+ syntaxVariable: { token: text.primary }
60
+ syntaxString: { token: accent.primary }
61
+ syntaxNumber: { token: accent.primary }
62
+ syntaxType: { token: accent.primary }
63
+ syntaxOperator: { token: text.primary }
64
+ syntaxPunctuation: { token: text.primary }
65
+ thinkingOff: { token: text.primary }
66
+ thinkingMinimal: { token: text.primary }
67
+ thinkingLow: { token: text.primary }
68
+ thinkingMedium: { token: text.primary }
69
+ thinkingHigh: { token: accent.primary }
70
+ thinkingXhigh: { token: accent.primary }
71
+ bashMode: { token: accent.primary }
72
+ pythonMode: { token: accent.primary }
73
+ btwMode: { token: accent.primary }
74
+ statusLineSep: { token: text.primary }
75
+ statusLineModel: { token: text.primary }
76
+ statusLinePath: { token: text.primary }
77
+ statusLineGitClean:
78
+ { token: status.success.foreground, fallback: [text.primary] }
79
+ statusLineGitDirty:
80
+ { token: status.warning.foreground, fallback: [accent.primary] }
81
+ statusLineContext: { token: text.primary }
82
+ statusLineSpend: { token: text.primary }
83
+ statusLineStaged: { token: text.primary }
84
+ statusLineDirty: { token: text.primary }
85
+ statusLineUntracked: { token: text.primary }
86
+ statusLineOutput: { token: text.primary }
87
+ statusLineCost: { token: text.primary }
88
+ statusLineSubagents: { token: text.primary }
89
+
90
+ # Required colors for OMP 19.4.1.
91
+ validation:
92
+ type: object
93
+ required: [name, colors]
94
+ additionalProperties: false
95
+ properties:
96
+ name: { type: string, pattern: '\S' }
97
+ colors:
98
+ type: object
99
+ required:
100
+ [
101
+ accent,
102
+ border,
103
+ borderAccent,
104
+ borderMuted,
105
+ success,
106
+ error,
107
+ warning,
108
+ muted,
109
+ dim,
110
+ text,
111
+ thinkingText,
112
+ selectedBg,
113
+ userMessageBg,
114
+ customMessageBg,
115
+ toolPendingBg,
116
+ toolSuccessBg,
117
+ toolErrorBg,
118
+ statusLineBg,
119
+ userMessageText,
120
+ customMessageText,
121
+ customMessageLabel,
122
+ toolTitle,
123
+ toolOutput,
124
+ mdHeading,
125
+ mdLink,
126
+ mdLinkUrl,
127
+ mdCode,
128
+ mdCodeBlock,
129
+ mdCodeBlockBorder,
130
+ mdQuote,
131
+ mdQuoteBorder,
132
+ mdHr,
133
+ mdListBullet,
134
+ toolDiffAdded,
135
+ toolDiffRemoved,
136
+ toolDiffContext,
137
+ syntaxComment,
138
+ syntaxKeyword,
139
+ syntaxFunction,
140
+ syntaxVariable,
141
+ syntaxString,
142
+ syntaxNumber,
143
+ syntaxType,
144
+ syntaxOperator,
145
+ syntaxPunctuation,
146
+ thinkingOff,
147
+ thinkingMinimal,
148
+ thinkingLow,
149
+ thinkingMedium,
150
+ thinkingHigh,
151
+ thinkingXhigh,
152
+ bashMode,
153
+ pythonMode,
154
+ statusLineSep,
155
+ statusLineModel,
156
+ statusLinePath,
157
+ statusLineGitClean,
158
+ statusLineGitDirty,
159
+ statusLineContext,
160
+ statusLineSpend,
161
+ statusLineStaged,
162
+ statusLineDirty,
163
+ statusLineUntracked,
164
+ statusLineOutput,
165
+ statusLineCost,
166
+ statusLineSubagents,
167
+ ]
168
+ additionalProperties: { $ref: '#/$defs/color' }
169
+ terminal:
170
+ type: object
171
+ additionalProperties: false
172
+ properties:
173
+ background: { $ref: '#/$defs/color' }
174
+ foreground: { $ref: '#/$defs/color' }
175
+ chrome: { $ref: '#/$defs/color' }
176
+ widget: { $ref: '#/$defs/color' }
177
+ ansi:
178
+ type: array
179
+ minItems: 16
180
+ maxItems: 16
181
+ items: { $ref: '#/$defs/color' }
182
+ export:
183
+ type: object
184
+ additionalProperties: false
185
+ properties:
186
+ pageBg: { $ref: '#/$defs/color' }
187
+ cardBg: { $ref: '#/$defs/color' }
188
+ infoBg: { $ref: '#/$defs/color' }
189
+ $defs:
190
+ color:
191
+ anyOf:
192
+ - { type: string, pattern: '^#[0-9A-Fa-f]{6}$' }
193
+ - { type: integer, minimum: 0, maximum: 255 }
194
+ - { const: '' }
@@ -0,0 +1,313 @@
1
+ version: 1
2
+ target: yazi
3
+ renderer: toml
4
+ artifact: flavor.toml
5
+ fields:
6
+ app:
7
+ overall:
8
+ bg: { token: surface.default }
9
+ mgr:
10
+ cwd:
11
+ fg: { token: accent.primary, fallback: [text.primary] }
12
+ border_style:
13
+ fg: { token: border.default, fallback: [text.muted, text.primary] }
14
+ find_keyword:
15
+ fg:
16
+ {
17
+ token: status.warning.foreground,
18
+ fallback: [accent.primary, text.primary],
19
+ }
20
+ bold: { literal: true }
21
+ underline: { literal: true }
22
+ find_position:
23
+ fg: { token: text.muted, fallback: [text.primary] }
24
+ symlink_target:
25
+ fg: { token: text.muted, fallback: [text.primary] }
26
+ italic: { literal: true }
27
+ marker_copied:
28
+ fg:
29
+ {
30
+ token: status.success.foreground,
31
+ fallback: [accent.primary, text.primary],
32
+ }
33
+ marker_cut:
34
+ fg:
35
+ {
36
+ token: status.error.foreground,
37
+ fallback: [accent.primary, text.primary],
38
+ }
39
+ marker_marked:
40
+ fg: { token: focus.ring, fallback: [accent.primary, text.primary] }
41
+ marker_selected:
42
+ fg:
43
+ {
44
+ token: status.warning.foreground,
45
+ fallback: [accent.primary, text.primary],
46
+ }
47
+ count_copied:
48
+ fg: { token: surface.default }
49
+ bg:
50
+ {
51
+ token: status.success.foreground,
52
+ fallback: [accent.primary, text.primary],
53
+ }
54
+ count_cut:
55
+ fg: { token: surface.default }
56
+ bg:
57
+ {
58
+ token: status.error.foreground,
59
+ fallback: [accent.primary, text.primary],
60
+ }
61
+ count_selected:
62
+ fg: { token: surface.default }
63
+ bg:
64
+ {
65
+ token: status.warning.foreground,
66
+ fallback: [accent.primary, text.primary],
67
+ }
68
+ indicator:
69
+ parent:
70
+ fg: { token: text.primary }
71
+ bg: { token: surface.raised, fallback: [surface.default] }
72
+ bold: { literal: true }
73
+ current:
74
+ fg: { token: selection.foreground, fallback: [text.primary] }
75
+ bg:
76
+ {
77
+ token: selection.background,
78
+ fallback: [surface.raised, surface.default],
79
+ }
80
+ bold: { literal: true }
81
+ preview:
82
+ underline: { literal: true }
83
+ tabs:
84
+ active:
85
+ fg: { token: selection.foreground, fallback: [text.primary] }
86
+ bg:
87
+ {
88
+ token: selection.background,
89
+ fallback: [surface.raised, surface.default],
90
+ }
91
+ bold: { literal: true }
92
+ inactive:
93
+ fg: { token: text.muted, fallback: [text.primary] }
94
+ bg: { token: surface.raised, fallback: [surface.default] }
95
+ mode:
96
+ normal_main:
97
+ fg: { token: surface.default }
98
+ bg: { token: accent.primary, fallback: [text.primary] }
99
+ bold: { literal: true }
100
+ normal_alt:
101
+ fg: { token: text.primary }
102
+ bg: { token: surface.raised, fallback: [surface.default] }
103
+ select_main:
104
+ fg: { token: surface.default }
105
+ bg:
106
+ {
107
+ token: status.warning.foreground,
108
+ fallback: [accent.primary, text.primary],
109
+ }
110
+ bold: { literal: true }
111
+ select_alt:
112
+ fg: { token: text.primary }
113
+ bg: { token: surface.raised, fallback: [surface.default] }
114
+ unset_main:
115
+ fg: { token: surface.default }
116
+ bg:
117
+ {
118
+ token: status.error.foreground,
119
+ fallback: [accent.primary, text.primary],
120
+ }
121
+ bold: { literal: true }
122
+ unset_alt:
123
+ fg: { token: text.primary }
124
+ bg: { token: surface.raised, fallback: [surface.default] }
125
+ status:
126
+ overall:
127
+ fg: { token: text.primary }
128
+ bg: { token: surface.default }
129
+ perm_type:
130
+ fg:
131
+ {
132
+ token: status.info.foreground,
133
+ fallback: [accent.primary, text.primary],
134
+ }
135
+ perm_read:
136
+ fg: { token: status.success.foreground, fallback: [text.primary] }
137
+ perm_write:
138
+ fg: { token: status.warning.foreground, fallback: [text.primary] }
139
+ perm_exec:
140
+ fg: { token: status.error.foreground, fallback: [text.primary] }
141
+ perm_sep:
142
+ fg: { token: text.muted, fallback: [text.primary] }
143
+ progress_label:
144
+ fg: { token: text.primary }
145
+ bold: { literal: true }
146
+ progress_normal:
147
+ fg:
148
+ {
149
+ token: status.success.foreground,
150
+ fallback: [accent.primary, text.primary],
151
+ }
152
+ bg: { token: surface.raised, fallback: [surface.default] }
153
+ progress_error:
154
+ fg:
155
+ {
156
+ token: status.error.foreground,
157
+ fallback: [accent.primary, text.primary],
158
+ }
159
+ bg: { token: surface.raised, fallback: [surface.default] }
160
+ filetype:
161
+ # Yazi takes the first match; keep the general file and directory rules last.
162
+ rules:
163
+ - url: { literal: '*' }
164
+ is: { literal: orphan }
165
+ fg:
166
+ {
167
+ token: status.error.foreground,
168
+ fallback: [terminal.ansi.normal.red, accent.primary, text.primary],
169
+ }
170
+ - mime: { literal: '**/image/*' }
171
+ fg:
172
+ {
173
+ token: terminal.ansi.normal.yellow,
174
+ fallback: [status.warning.foreground, text.primary],
175
+ }
176
+ - mime: { literal: '**/{audio,video}/*' }
177
+ fg:
178
+ {
179
+ token: terminal.ansi.normal.magenta,
180
+ fallback: [accent.primary, text.primary],
181
+ }
182
+ - mime:
183
+ {
184
+ literal: '**/application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}',
185
+ }
186
+ fg:
187
+ {
188
+ token: terminal.ansi.normal.red,
189
+ fallback: [status.warning.foreground, text.primary],
190
+ }
191
+ - mime: { literal: '**/application/{pdf,doc,rtf}' }
192
+ fg:
193
+ {
194
+ token: terminal.ansi.normal.cyan,
195
+ fallback: [status.info.foreground, text.primary],
196
+ }
197
+ - url: { literal: '*' }
198
+ is: { literal: exec }
199
+ fg:
200
+ {
201
+ token: status.success.foreground,
202
+ fallback:
203
+ [terminal.ansi.normal.green, accent.primary, text.primary],
204
+ }
205
+ - url: { literal: '*/' }
206
+ fg:
207
+ {
208
+ token: status.info.foreground,
209
+ fallback: [terminal.ansi.normal.blue, accent.primary, text.primary],
210
+ }
211
+ - url: { literal: '*' }
212
+ fg: { token: text.primary }
213
+
214
+ validation:
215
+ type: object
216
+ additionalProperties: false
217
+ properties:
218
+ app:
219
+ type: object
220
+ additionalProperties: false
221
+ properties:
222
+ overall:
223
+ type: object
224
+ additionalProperties: false
225
+ properties:
226
+ bg: { $ref: '#/definitions/color' }
227
+ mgr:
228
+ type: object
229
+ propertyNames:
230
+ enum:
231
+ [
232
+ cwd,
233
+ border_style,
234
+ find_keyword,
235
+ find_position,
236
+ symlink_target,
237
+ marker_copied,
238
+ marker_cut,
239
+ marker_marked,
240
+ marker_selected,
241
+ count_copied,
242
+ count_cut,
243
+ count_selected,
244
+ ]
245
+ additionalProperties: { $ref: '#/definitions/style' }
246
+ indicator:
247
+ type: object
248
+ propertyNames: { enum: [parent, current, preview] }
249
+ additionalProperties: { $ref: '#/definitions/style' }
250
+ tabs:
251
+ type: object
252
+ propertyNames: { enum: [active, inactive] }
253
+ additionalProperties: { $ref: '#/definitions/style' }
254
+ mode:
255
+ type: object
256
+ propertyNames:
257
+ {
258
+ enum:
259
+ [
260
+ normal_main,
261
+ normal_alt,
262
+ select_main,
263
+ select_alt,
264
+ unset_main,
265
+ unset_alt,
266
+ ],
267
+ }
268
+ additionalProperties: { $ref: '#/definitions/style' }
269
+ status:
270
+ type: object
271
+ propertyNames:
272
+ enum:
273
+ [
274
+ overall,
275
+ perm_type,
276
+ perm_read,
277
+ perm_write,
278
+ perm_exec,
279
+ perm_sep,
280
+ progress_label,
281
+ progress_normal,
282
+ progress_error,
283
+ ]
284
+ additionalProperties: { $ref: '#/definitions/style' }
285
+ filetype:
286
+ type: object
287
+ additionalProperties: false
288
+ properties:
289
+ rules:
290
+ type: array
291
+ items:
292
+ type: object
293
+ additionalProperties: false
294
+ anyOf:
295
+ - required: [url]
296
+ - required: [mime]
297
+ required: [fg]
298
+ properties:
299
+ url: { type: string, minLength: 1 }
300
+ mime: { type: string, minLength: 1 }
301
+ is: { type: string, minLength: 1 }
302
+ fg: { $ref: '#/definitions/color' }
303
+ definitions:
304
+ color: { type: string, pattern: '^#[0-9A-Fa-f]{6}$' }
305
+ style:
306
+ type: object
307
+ additionalProperties: false
308
+ properties:
309
+ fg: { $ref: '#/definitions/color' }
310
+ bg: { $ref: '#/definitions/color' }
311
+ bold: { type: boolean }
312
+ italic: { type: boolean }
313
+ underline: { type: boolean }