From 0b6d62f65e52038f24e905cb6a061250da4feaa2 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 25 Mar 2024 21:50:21 +0400 Subject: [PATCH] wiki: Add configuration overview --- wiki/Configuration:-Overview.md | 34 +++++++++++++++++++++++++++++++++ wiki/_Sidebar.md | 6 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 wiki/Configuration:-Overview.md diff --git a/wiki/Configuration:-Overview.md b/wiki/Configuration:-Overview.md new file mode 100644 index 0000000..ea8f656 --- /dev/null +++ b/wiki/Configuration:-Overview.md @@ -0,0 +1,34 @@ +### Loading + +Niri will load configuration from `$XDG_CONFIG_HOME/.config/niri/config.kdl` or `~/.config/niri/config.kdl`. +If that file is missing, niri will create it with the contents of [the default configuration file](../resources/default-config.kdl). +Please use the default configuration file as the starting point for your custom configuration. + +The configuration is live-reloaded. +Simply edit and save the config file, and your changes will be applied. +This includes key bindings, output settings like mode, window rules, and everything else. + +You can run `niri validate` to parse the config and see any errors. + +To use a different config file path, pass it in the `--config` or `-c` argument to `niri`. + +### Syntax + +The config is written in [KDL]. +Lines starting with `//` are comments; they are ignored. + +Also, you can put `/-` in front of a node to comment out the entire node: + +``` +/-output "eDP-1" { + everything inside here + is ignored +} +``` + +### Defaults + +Omitting most of the sections of the config file will leave you with the default values for that section. +A notable exception is `binds {}`: they do not get filled with defaults, so make sure you do not erase this section. + +[KDL]: https://kdl.dev/ diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md index 545dd5c..b250761 100644 --- a/wiki/_Sidebar.md +++ b/wiki/_Sidebar.md @@ -5,6 +5,10 @@ * [VSCode, Chromium, WezTerm](https://github.com/YaLTeR/niri/wiki/Application-Issues) * [Xwayland](https://github.com/YaLTeR/niri/wiki/Xwayland) +## Configuration +* [Overview](https://github.com/YaLTeR/niri/wiki/Configuration:-Overview.md) +* [Input](https://github.com/YaLTeR/niri/wiki/Configuration:-Input.md) + ## Development * [Design Principles](https://github.com/YaLTeR/niri/wiki/Design-Principles) -* [Developing niri](https://github.com/YaLTeR/niri/wiki/Developing-niri) \ No newline at end of file +* [Developing niri](https://github.com/YaLTeR/niri/wiki/Developing-niri)