1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 10:41:03 +02:00

feat(config): json schema support

This PR includes the necessary code changes, CI changes and documentation to generate and deploy a full JSON schema for each release and the master branch, which can be used within config files for autocomplete and type checking.
This commit is contained in:
Jake Stanger 2024-05-10 22:40:00 +01:00
parent a47ef0c763
commit 36d724f148
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
36 changed files with 230 additions and 15 deletions

View file

@ -101,6 +101,9 @@ cargo build --release --no-default-features \
| workspaces+all | Enables the `workspaces` module with support for all compositors. |
| workspaces+sway | Enables the `workspaces` module with support for Sway. |
| workspaces+hyprland | Enables the `workspaces` module with support for Hyprland. |
| **Other** | |
| schema | Enables JSON schema support and the CLI `--print-schema` flag. |
## Speeding up compiling

View file

@ -20,11 +20,18 @@ Ironbar supports a range of configuration formats, so you can pick your favourit
- `config.json`
- `config.toml`
- `config.yaml`
- `config.corn` (Experimental, includes variable support for re-using blocks.
- `config.corn` (Includes variable support for re-using blocks.
See [here](https://github.com/jakestanger/corn) for info)
You can also override the default config path using the `IRONBAR_CONFIG` environment variable.
A hosted schema is available for the latest Git version ~~and each versioned release~~.
JSON and YAML both support schema checking by adding the `$schema` key
to the top level of your config.
- master: `https://f.jstanger.dev/github/ironbar/schema.json`
- ~~release: `https://f.jstanger.dev/github/ironbar/schema-v0.16.0.json`~~ *(Not released yet)*
## 2. Pick your use-case
Ironbar gives you a few ways to configure the bar to suit your needs.