diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-04-28 07:53:03 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-04-28 07:54:02 +0300 |
| commit | c9d6478c3cea86803f4822baf0fcae062b05b8eb (patch) | |
| tree | df47729f08ac3609b318a3ef5a34db763a453ba3 | |
| parent | 758cca5432ee87157f6717081cc5e71c09031ea5 (diff) | |
| download | niri-c9d6478c3cea86803f4822baf0fcae062b05b8eb.tar.gz niri-c9d6478c3cea86803f4822baf0fcae062b05b8eb.tar.bz2 niri-c9d6478c3cea86803f4822baf0fcae062b05b8eb.zip | |
wiki: Rename Configuration: Overview page to Introduction
| -rw-r--r-- | resources/default-config.kdl | 2 | ||||
| -rw-r--r-- | wiki/Configuration:-Debug-Options.md | 2 | ||||
| -rw-r--r-- | wiki/Configuration:-Introduction.md | 150 | ||||
| -rw-r--r-- | wiki/Configuration:-Overview.md | 151 | ||||
| -rw-r--r-- | wiki/Getting-Started.md | 2 | ||||
| -rw-r--r-- | wiki/_Sidebar.md | 2 |
6 files changed, 155 insertions, 154 deletions
diff --git a/resources/default-config.kdl b/resources/default-config.kdl index 8d0e316e..197a4afa 100644 --- a/resources/default-config.kdl +++ b/resources/default-config.kdl @@ -1,7 +1,7 @@ // This config is in the KDL format: https://kdl.dev // "/-" comments out the following node. // Check the wiki for a full description of the configuration: -// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview +// https://github.com/YaLTeR/niri/wiki/Configuration:-Introduction // Input device configuration. // Find the full list of options on the wiki: diff --git a/wiki/Configuration:-Debug-Options.md b/wiki/Configuration:-Debug-Options.md index 0911ebb1..a90a430e 100644 --- a/wiki/Configuration:-Debug-Options.md +++ b/wiki/Configuration:-Debug-Options.md @@ -4,7 +4,7 @@ Niri has several options that are only useful for debugging, or are experimental They are not meant for normal use. > [!CAUTION] -> These options are **not** covered by the [config breaking change policy](./Configuration:-Overview.md#breaking-change-policy). +> These options are **not** covered by the [config breaking change policy](./Configuration:-Introduction.md#breaking-change-policy). > They can change or stop working at any point with little notice. Here are all the options at a glance: diff --git a/wiki/Configuration:-Introduction.md b/wiki/Configuration:-Introduction.md new file mode 100644 index 00000000..3966a650 --- /dev/null +++ b/wiki/Configuration:-Introduction.md @@ -0,0 +1,150 @@ +### Per-Section Documentation + +You can find documentation for various sections of the config on these wiki pages: + +* [`input {}`](./Configuration:-Input.md) +* [`output "eDP-1" {}`](./Configuration:-Outputs.md) +* [`binds {}`](./Configuration:-Key-Bindings.md) +* [`switch-events {}`](./Configuration:-Switch-Events.md) +* [`layout {}`](./Configuration:-Layout.md) +* [top-level options](./Configuration:-Miscellaneous.md) +* [`window-rule {}`](./Configuration:-Window-Rules.md) +* [`layer-rule {}`](./Configuration:-Layer-Rules.md) +* [`animations {}`](./Configuration:-Animations.md) +* [`gestures {}`](./Configuration:-Gestures.md) +* [`debug {}`](./Configuration:-Debug-Options.md) + +### Loading + +Niri will load configuration from `$XDG_CONFIG_HOME/niri/config.kdl` or `~/.config/niri/config.kdl`, falling back to `/etc/niri/config.kdl`. +If both of these files are missing, niri will create `$XDG_CONFIG_HOME/niri/config.kdl` with the contents of [the default configuration file](https://github.com/YaLTeR/niri/blob/main/resources/default-config.kdl), which are embedded into the niri binary at build time. +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`. + +You can also set `$NIRI_CONFIG` to the path of the config file. +`--config` always takes precedence. +If `--config` or `$NIRI_CONFIG` doesn't point to a real file, the config will not be loaded. +If `$NIRI_CONFIG` is set to an empty string, it is ignored and the default config location is used instead. + +### Syntax + +The config is written in [KDL]. + +#### Comments + +Lines starting with `//` are comments; they are ignored. + +Also, you can put `/-` in front of a section to comment out the entire section: + +```kdl +/-output "eDP-1" { + // Everything inside here is ignored. + // The display won't be turned off + // as the whole section is commented out. + off +} +``` + +#### Flags + +Toggle options in niri are commonly represented as flags. +Writing out the flag enables it, and omitting it or commenting it out disables it. +For example: + +```kdl +// "Focus follows mouse" is enabled. +input { + focus-follows-mouse + + // Other settings... +} +``` + +```kdl +// "Focus follows mouse" is disabled. +input { + // focus-follows-mouse + + // Other settings... +} +``` + +#### Sections + +Most sections cannot be repeated. For example: + +```kdl +// This is valid: every section appears once. +input { + keyboard { + // ... + } + + touchpad { + // ... + } +} +``` + +```kdl,must-fail +// This is NOT valid: input section appears twice. +input { + keyboard { + // ... + } +} + +input { + touchpad { + // ... + } +} +``` + +Exceptions are, for example, sections that configure different devices by name: + +<!-- NOTE: this may break in the future --> +```kdl +output "eDP-1" { + // ... +} + +// This is valid: this section configures a different output. +output "HDMI-A-1" { + // ... +} + +// This is NOT valid: "eDP-1" already appeared above. +// It will either throw a config parsing error, or otherwise not work. +output "eDP-1" { + // ... +} +``` + +### 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 {}`](./Configuration:-Key-Bindings.md): they do not get filled with defaults, so make sure you do not erase this section. + +### Breaking Change Policy + +As a rule, niri updates should not break existing config files. +(For example, the default config from niri v0.1.0 still parses fine on v25.02 as I'm writing this.) + +Exceptions can be made for parsing bugs. +For example, niri used to accept multiple binds to the same key, but this was not intended and did not do anything (the first bind was always used). +A patch release changed niri from silently accepting this to causing a parsing failure. +This is not a blanket rule, I will consider the potential impact of every breaking change like this before deciding to carry on with it. + +Keep in mind that the breaking change policy applies only to niri releases. +Commits between releases can and do occasionally break the config as new features are ironed out. +However, I do try to limit these, since several people are running git builds. + +[KDL]: https://kdl.dev/ diff --git a/wiki/Configuration:-Overview.md b/wiki/Configuration:-Overview.md index 3966a650..974fe768 100644 --- a/wiki/Configuration:-Overview.md +++ b/wiki/Configuration:-Overview.md @@ -1,150 +1 @@ -### Per-Section Documentation - -You can find documentation for various sections of the config on these wiki pages: - -* [`input {}`](./Configuration:-Input.md) -* [`output "eDP-1" {}`](./Configuration:-Outputs.md) -* [`binds {}`](./Configuration:-Key-Bindings.md) -* [`switch-events {}`](./Configuration:-Switch-Events.md) -* [`layout {}`](./Configuration:-Layout.md) -* [top-level options](./Configuration:-Miscellaneous.md) -* [`window-rule {}`](./Configuration:-Window-Rules.md) -* [`layer-rule {}`](./Configuration:-Layer-Rules.md) -* [`animations {}`](./Configuration:-Animations.md) -* [`gestures {}`](./Configuration:-Gestures.md) -* [`debug {}`](./Configuration:-Debug-Options.md) - -### Loading - -Niri will load configuration from `$XDG_CONFIG_HOME/niri/config.kdl` or `~/.config/niri/config.kdl`, falling back to `/etc/niri/config.kdl`. -If both of these files are missing, niri will create `$XDG_CONFIG_HOME/niri/config.kdl` with the contents of [the default configuration file](https://github.com/YaLTeR/niri/blob/main/resources/default-config.kdl), which are embedded into the niri binary at build time. -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`. - -You can also set `$NIRI_CONFIG` to the path of the config file. -`--config` always takes precedence. -If `--config` or `$NIRI_CONFIG` doesn't point to a real file, the config will not be loaded. -If `$NIRI_CONFIG` is set to an empty string, it is ignored and the default config location is used instead. - -### Syntax - -The config is written in [KDL]. - -#### Comments - -Lines starting with `//` are comments; they are ignored. - -Also, you can put `/-` in front of a section to comment out the entire section: - -```kdl -/-output "eDP-1" { - // Everything inside here is ignored. - // The display won't be turned off - // as the whole section is commented out. - off -} -``` - -#### Flags - -Toggle options in niri are commonly represented as flags. -Writing out the flag enables it, and omitting it or commenting it out disables it. -For example: - -```kdl -// "Focus follows mouse" is enabled. -input { - focus-follows-mouse - - // Other settings... -} -``` - -```kdl -// "Focus follows mouse" is disabled. -input { - // focus-follows-mouse - - // Other settings... -} -``` - -#### Sections - -Most sections cannot be repeated. For example: - -```kdl -// This is valid: every section appears once. -input { - keyboard { - // ... - } - - touchpad { - // ... - } -} -``` - -```kdl,must-fail -// This is NOT valid: input section appears twice. -input { - keyboard { - // ... - } -} - -input { - touchpad { - // ... - } -} -``` - -Exceptions are, for example, sections that configure different devices by name: - -<!-- NOTE: this may break in the future --> -```kdl -output "eDP-1" { - // ... -} - -// This is valid: this section configures a different output. -output "HDMI-A-1" { - // ... -} - -// This is NOT valid: "eDP-1" already appeared above. -// It will either throw a config parsing error, or otherwise not work. -output "eDP-1" { - // ... -} -``` - -### 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 {}`](./Configuration:-Key-Bindings.md): they do not get filled with defaults, so make sure you do not erase this section. - -### Breaking Change Policy - -As a rule, niri updates should not break existing config files. -(For example, the default config from niri v0.1.0 still parses fine on v25.02 as I'm writing this.) - -Exceptions can be made for parsing bugs. -For example, niri used to accept multiple binds to the same key, but this was not intended and did not do anything (the first bind was always used). -A patch release changed niri from silently accepting this to causing a parsing failure. -This is not a blanket rule, I will consider the potential impact of every breaking change like this before deciding to carry on with it. - -Keep in mind that the breaking change policy applies only to niri releases. -Commits between releases can and do occasionally break the config as new features are ironed out. -However, I do try to limit these, since several people are running git builds. - -[KDL]: https://kdl.dev/ +This wiki page has moved to: [Introduction](./Configuration:-Introduction.md). diff --git a/wiki/Getting-Started.md b/wiki/Getting-Started.md index 6f657cd9..072a14ba 100644 --- a/wiki/Getting-Started.md +++ b/wiki/Getting-Started.md @@ -17,7 +17,7 @@ Then it will open as a window, where you can give it a try. Note that this windowed mode is mainly meant for development, so it is a bit buggy (in particular, there are issues with hotkeys). Next, see the [list of important software](./Important-Software.md) required for normal desktop use, like a notification daemon and portals. -Also, check the [configuration overview](./Configuration:-Overview.md) page to get started configuring niri. +Also, check the [configuration introduction](./Configuration:-Introduction.md) page to get started configuring niri. There you can find links to other pages containing thorough documentation and examples for all options. Finally, the [Xwayland](./Xwayland.md) page explains how to run X11 applications on niri. diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md index a19f44d4..2a35714f 100644 --- a/wiki/_Sidebar.md +++ b/wiki/_Sidebar.md @@ -16,7 +16,7 @@ * [FAQ](./FAQ.md) ## Configuration -* [Overview](./Configuration:-Overview.md) +* [Introduction](./Configuration:-Introduction.md) * [Input](./Configuration:-Input.md) * [Outputs](./Configuration:-Outputs.md) * [Key Bindings](./Configuration:-Key-Bindings.md) |
