wiki: Add configuration overview
Browse files at this commit0b6d62f65e52038f24e905cb6a061250da4feaa2Parent: cf54f752 changed files +39 -1
- wiki/Configuration:-Overview.md +34 -0
- wiki/_Sidebar.md +5 -1
wiki/Configuration:-Overview.mdadded+34 -0
| @@ -0,0 +1,34 @@ | |||
| 1 | +### Loading | ||
| 2 | + | ||
| 3 | +Niri will load configuration from `$XDG_CONFIG_HOME/.config/niri/config.kdl` or `~/.config/niri/config.kdl`. | ||
| 4 | +If that file is missing, niri will create it with the contents of [the default configuration file](../resources/default-config.kdl). | ||
| 5 | +Please use the default configuration file as the starting point for your custom configuration. | ||
| 6 | + | ||
| 7 | +The configuration is live-reloaded. | ||
| 8 | +Simply edit and save the config file, and your changes will be applied. | ||
| 9 | +This includes key bindings, output settings like mode, window rules, and everything else. | ||
| 10 | + | ||
| 11 | +You can run `niri validate` to parse the config and see any errors. | ||
| 12 | + | ||
| 13 | +To use a different config file path, pass it in the `--config` or `-c` argument to `niri`. | ||
| 14 | + | ||
| 15 | +### Syntax | ||
| 16 | + | ||
| 17 | +The config is written in [KDL]. | ||
| 18 | +Lines starting with `//` are comments; they are ignored. | ||
| 19 | + | ||
| 20 | +Also, you can put `/-` in front of a node to comment out the entire node: | ||
| 21 | + | ||
| 22 | +``` | ||
| 23 | +/-output "eDP-1" { | ||
| 24 | + everything inside here | ||
| 25 | + is ignored | ||
| 26 | +} | ||
| 27 | +``` | ||
| 28 | + | ||
| 29 | +### Defaults | ||
| 30 | + | ||
| 31 | +Omitting most of the sections of the config file will leave you with the default values for that section. | ||
| 32 | +A notable exception is `binds {}`: they do not get filled with defaults, so make sure you do not erase this section. | ||
| 33 | + | ||
| 34 | +[KDL]: https://kdl.dev/ | ||
wiki/_Sidebar.mdmodified+5 -1
| @@ -5,6 +5,10 @@ | |||
| 5 | * [VSCode, Chromium, WezTerm](https://github.com/YaLTeR/niri/wiki/Application-Issues) | 5 | * [VSCode, Chromium, WezTerm](https://github.com/YaLTeR/niri/wiki/Application-Issues) |
| 6 | * [Xwayland](https://github.com/YaLTeR/niri/wiki/Xwayland) | 6 | * [Xwayland](https://github.com/YaLTeR/niri/wiki/Xwayland) |
| 7 | 7 | ||
| 8 | +## Configuration | ||
| 9 | +* [Overview](https://github.com/YaLTeR/niri/wiki/Configuration:-Overview.md) | ||
| 10 | +* [Input](https://github.com/YaLTeR/niri/wiki/Configuration:-Input.md) | ||
| 11 | + | ||
| 8 | ## Development | 12 | ## Development |
| 9 | * [Design Principles](https://github.com/YaLTeR/niri/wiki/Design-Principles) | 13 | * [Design Principles](https://github.com/YaLTeR/niri/wiki/Design-Principles) |
| 10 | -* [Developing niri](https://github.com/YaLTeR/niri/wiki/Developing-niri) | ||
| \ No newline at end of file | \ No newline at end of file | ||
| 14 | +* [Developing niri](https://github.com/YaLTeR/niri/wiki/Developing-niri) | ||