feat: use TOML for editable color configuration
This commit is contained in:
@@ -134,20 +134,18 @@ The picker works offline with 1,870 emoji from [gemoji v4.1.0](https://github.co
|
||||
|
||||
## Color scheme
|
||||
|
||||
Create `$XDG_CONFIG_HOME/conjure/config.json`, or `~/.config/conjure/config.json` when `XDG_CONFIG_HOME` is unset, empty, or relative. No configuration is required: Conjure keeps its built-in sunset colors by default.
|
||||
Create `$XDG_CONFIG_HOME/conjure/config.toml`, or `~/.config/conjure/config.toml` when `XDG_CONFIG_HOME` is unset, empty, or relative. No configuration is required: Conjure keeps its built-in sunset colors by default. The editable configuration uses TOML, including comments and standard TOML quoting.
|
||||
|
||||
```json
|
||||
{
|
||||
"colors": {
|
||||
"background": "#171b24",
|
||||
"text": "#e0e6f0",
|
||||
"secondaryText": "#a0adc0",
|
||||
"accent": "#82aaff",
|
||||
"glow": "#c792ea",
|
||||
"keyBackground": "#303848",
|
||||
"error": "#ff5370"
|
||||
}
|
||||
}
|
||||
```toml
|
||||
# Override only the colors you want to change.
|
||||
[colors]
|
||||
background = "#171b24"
|
||||
text = "#e0e6f0"
|
||||
secondaryText = "#a0adc0"
|
||||
accent = "#82aaff"
|
||||
glow = "#c792ea"
|
||||
keyBackground = "#303848"
|
||||
error = "#ff5370"
|
||||
```
|
||||
|
||||
Every color is optional and must be an opaque `#RRGGBB` value. `accent` colors selections, borders, carets, and the primary background glows; `glow` colors the secondary background glow. `keyBackground` colors application-number shortcut badges, and `error` colors errors and destructive actions. Overrides apply throughout the launcher, tools, popups, and Settings wherever those shared colors are used.
|
||||
@@ -156,20 +154,18 @@ Only colors change. Frosted glass, glow positions and sizes, opacity, selection
|
||||
|
||||
### Follow tint
|
||||
|
||||
The sibling [tint](../tint) tool generates `conjure/theme.json` in the same configuration directory when it applies a theme. Rebuild/install the updated tint tool with `make install` in its repository, then apply your chosen pair, for example `tint swamp`. Opt in from Conjure's `config.json`:
|
||||
The sibling [tint](../tint) tool generates `conjure/theme.json` in the same configuration directory when it applies a theme. This machine-generated palette stays JSON and is not intended for editing. Rebuild/install the updated tint tool with `make install` in its repository, then apply your chosen pair, for example `tint swamp`. Opt in from Conjure's `config.toml`:
|
||||
|
||||
```json
|
||||
{
|
||||
"theme": "tint",
|
||||
"colors": {
|
||||
"accent": "#82aaff"
|
||||
}
|
||||
}
|
||||
```toml
|
||||
theme = "tint"
|
||||
|
||||
[colors]
|
||||
accent = "#82aaff" # Optional personal override
|
||||
```
|
||||
|
||||
Precedence is personal `colors` → tint-generated colors → built-in sunset colors. Omit `colors` to follow tint without overrides. Omit `theme`, or set it to `"sunset"`, to ignore the generated palette. tint never overwrites `config.json`; edit that file, not the generated `theme.json`. Both processes must use the same configuration directory.
|
||||
Precedence is personal `[colors]` → tint-generated colors → built-in sunset colors. Omit `[colors]` to follow tint without overrides. Omit `theme`, or set it to `"sunset"` before any table, to ignore the generated palette. tint never overwrites `config.toml`; edit that file, not the generated `theme.json`. Both processes must use the same configuration directory.
|
||||
|
||||
Conjure reads colors once at launch. Quit and reopen it after editing configuration or applying a tint theme, including automatic light/dark switches. Invalid JSON, unknown keys, unsupported themes, invalid colors, or a missing selected tint palette cause a full fallback to sunset and a file-specific error in Settings. Normal launches open Settings to show the error; login launches leave it available for the next time Settings opens.
|
||||
Conjure reads colors once at launch. Quit and reopen it after editing configuration or applying a tint theme, including automatic light/dark switches. Invalid TOML, invalid generated JSON, unknown keys, unsupported themes, invalid colors, or a missing selected tint palette cause a full fallback to sunset and a file-specific error in Settings. Normal launches open Settings to show the error; login launches leave it available for the next time Settings opens.
|
||||
|
||||
## System theme
|
||||
|
||||
|
||||
Reference in New Issue
Block a user