docs: use TOML for Conjure configuration
This commit is contained in:
@@ -123,13 +123,13 @@ Configure OMP to use `tinty-current` where required.
|
|||||||
|
|
||||||
The `apply-apps` flow writes `$XDG_CONFIG_HOME/conjure/theme.json`, falling back to `~/.config/conjure/theme.json` when `XDG_CONFIG_HOME` is unset, empty, or relative. The generated JSON contains seven opaque colors: `background`, `text`, `secondaryText`, `accent`, `glow`, `keyBackground`, and `error`, using Tinty semantic UI colors with Base16/Base24 or tinted8 palette fallbacks.
|
The `apply-apps` flow writes `$XDG_CONFIG_HOME/conjure/theme.json`, falling back to `~/.config/conjure/theme.json` when `XDG_CONFIG_HOME` is unset, empty, or relative. The generated JSON contains seven opaque colors: `background`, `text`, `secondaryText`, `accent`, `glow`, `keyBackground`, and `error`, using Tinty semantic UI colors with Base16/Base24 or tinted8 palette fallbacks.
|
||||||
|
|
||||||
Opt in by adding this to `conjure/config.json` in the same configuration directory:
|
Opt in by adding this to `conjure/config.toml` in the same configuration directory:
|
||||||
|
|
||||||
```json
|
```toml
|
||||||
{"theme":"tint"}
|
theme = "tint"
|
||||||
```
|
```
|
||||||
|
|
||||||
The wrapper never changes `config.json`. Optional entries in its `colors` object override generated colors. Conjure reads configuration only at launch: restart Conjure after applying a theme or editing its configuration. The wrapper does not signal, reload, restart, or notify Conjure.
|
The wrapper never changes `config.toml`. Optional entries in its `[colors]` table override generated colors. Only the machine-generated `theme.json` uses JSON; edit the TOML configuration instead. Conjure reads configuration only at launch: restart Conjure after applying a theme or editing its configuration. The wrapper does not signal, reload, restart, or notify Conjure.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -181,11 +181,11 @@ esac
|
|||||||
if err := os.WriteFile(zed, []byte(`{"name":"old","themes":[{"name":"old"}]}`), 0o644); err != nil {
|
if err := os.WriteFile(zed, []byte(`{"name":"old","themes":[{"name":"old"}]}`), 0o644); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
conjureConfig := filepath.Join(tmp, "xdg", "conjure", "config.json")
|
conjureConfig := filepath.Join(tmp, "xdg", "conjure", "config.toml")
|
||||||
if err := os.MkdirAll(filepath.Dir(conjureConfig), 0o755); err != nil {
|
if err := os.MkdirAll(filepath.Dir(conjureConfig), 0o755); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
const userConfig = `{"theme":"tint","colors":{"accent":"#abcdef"}}`
|
const userConfig = "theme = \"tint\"\n\n[colors]\naccent = \"#abcdef\"\n"
|
||||||
if err := os.WriteFile(conjureConfig, []byte(userConfig), 0o644); err != nil {
|
if err := os.WriteFile(conjureConfig, []byte(userConfig), 0o644); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user