forge
Explore
Log in

Don't you dare go Hollow

wiki: Rename Configuration: Overview page to Introduction

Browse files at this commit

c9d6478c3cea86803f4822baf0fcae062b05b8ebIvan MolodetskikhParent: 758cca5
resources/default-config.kdlmodified+1 -1
@@ -1,7 +1,7 @@
1 // This config is in the KDL format: https://kdl.dev1 // This config is in the KDL format: https://kdl.dev
2 // "/-" comments out the following node.2 // "/-" comments out the following node.
3 // Check the wiki for a full description of the configuration:3 // Check the wiki for a full description of the configuration:
4-// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview4+// https://github.com/YaLTeR/niri/wiki/Configuration:-Introduction
5 5
6 // Input device configuration.6 // Input device configuration.
7 // Find the full list of options on the wiki:7 // Find the full list of options on the wiki:
wiki/Configuration:-Debug-Options.mdmodified+1 -1
@@ -4,7 +4,7 @@ Niri has several options that are only useful for debugging, or are experimental
4 They are not meant for normal use.4 They are not meant for normal use.
5 5
6 > [!CAUTION]6 > [!CAUTION]
7-> These options are **not** covered by the [config breaking change policy](./Configuration:-Overview.md#breaking-change-policy).7+> These options are **not** covered by the [config breaking change policy](./Configuration:-Introduction.md#breaking-change-policy).
8 > They can change or stop working at any point with little notice.8 > They can change or stop working at any point with little notice.
9 9
10 Here are all the options at a glance:10 Here are all the options at a glance:
wiki/Configuration:-Introduction.mdadded+150 -0
@@ -0,0 +1,150 @@
1+### Per-Section Documentation
2+
3+You can find documentation for various sections of the config on these wiki pages:
4+
5+* [`input {}`](./Configuration:-Input.md)
6+* [`output "eDP-1" {}`](./Configuration:-Outputs.md)
7+* [`binds {}`](./Configuration:-Key-Bindings.md)
8+* [`switch-events {}`](./Configuration:-Switch-Events.md)
9+* [`layout {}`](./Configuration:-Layout.md)
10+* [top-level options](./Configuration:-Miscellaneous.md)
11+* [`window-rule {}`](./Configuration:-Window-Rules.md)
12+* [`layer-rule {}`](./Configuration:-Layer-Rules.md)
13+* [`animations {}`](./Configuration:-Animations.md)
14+* [`gestures {}`](./Configuration:-Gestures.md)
15+* [`debug {}`](./Configuration:-Debug-Options.md)
16+
17+### Loading
18+
19+Niri will load configuration from `$XDG_CONFIG_HOME/niri/config.kdl` or `~/.config/niri/config.kdl`, falling back to `/etc/niri/config.kdl`.
20+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.
21+Please use the default configuration file as the starting point for your custom configuration.
22+
23+The configuration is live-reloaded.
24+Simply edit and save the config file, and your changes will be applied.
25+This includes key bindings, output settings like mode, window rules, and everything else.
26+
27+You can run `niri validate` to parse the config and see any errors.
28+
29+To use a different config file path, pass it in the `--config` or `-c` argument to `niri`.
30+
31+You can also set `$NIRI_CONFIG` to the path of the config file.
32+`--config` always takes precedence.
33+If `--config` or `$NIRI_CONFIG` doesn't point to a real file, the config will not be loaded.
34+If `$NIRI_CONFIG` is set to an empty string, it is ignored and the default config location is used instead.
35+
36+### Syntax
37+
38+The config is written in [KDL].
39+
40+#### Comments
41+
42+Lines starting with `//` are comments; they are ignored.
43+
44+Also, you can put `/-` in front of a section to comment out the entire section:
45+
46+```kdl
47+/-output "eDP-1" {
48+ // Everything inside here is ignored.
49+ // The display won't be turned off
50+ // as the whole section is commented out.
51+ off
52+}
53+```
54+
55+#### Flags
56+
57+Toggle options in niri are commonly represented as flags.
58+Writing out the flag enables it, and omitting it or commenting it out disables it.
59+For example:
60+
61+```kdl
62+// "Focus follows mouse" is enabled.
63+input {
64+ focus-follows-mouse
65+
66+ // Other settings...
67+}
68+```
69+
70+```kdl
71+// "Focus follows mouse" is disabled.
72+input {
73+ // focus-follows-mouse
74+
75+ // Other settings...
76+}
77+```
78+
79+#### Sections
80+
81+Most sections cannot be repeated. For example:
82+
83+```kdl
84+// This is valid: every section appears once.
85+input {
86+ keyboard {
87+ // ...
88+ }
89+
90+ touchpad {
91+ // ...
92+ }
93+}
94+```
95+
96+```kdl,must-fail
97+// This is NOT valid: input section appears twice.
98+input {
99+ keyboard {
100+ // ...
101+ }
102+}
103+
104+input {
105+ touchpad {
106+ // ...
107+ }
108+}
109+```
110+
111+Exceptions are, for example, sections that configure different devices by name:
112+
113+<!-- NOTE: this may break in the future -->
114+```kdl
115+output "eDP-1" {
116+ // ...
117+}
118+
119+// This is valid: this section configures a different output.
120+output "HDMI-A-1" {
121+ // ...
122+}
123+
124+// This is NOT valid: "eDP-1" already appeared above.
125+// It will either throw a config parsing error, or otherwise not work.
126+output "eDP-1" {
127+ // ...
128+}
129+```
130+
131+### Defaults
132+
133+Omitting most of the sections of the config file will leave you with the default values for that section.
134+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.
135+
136+### Breaking Change Policy
137+
138+As a rule, niri updates should not break existing config files.
139+(For example, the default config from niri v0.1.0 still parses fine on v25.02 as I'm writing this.)
140+
141+Exceptions can be made for parsing bugs.
142+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).
143+A patch release changed niri from silently accepting this to causing a parsing failure.
144+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.
145+
146+Keep in mind that the breaking change policy applies only to niri releases.
147+Commits between releases can and do occasionally break the config as new features are ironed out.
148+However, I do try to limit these, since several people are running git builds.
149+
150+[KDL]: https://kdl.dev/
wiki/Configuration:-Overview.mdmodified+1 -150
@@ -1,150 +1 @@
1-### Per-Section Documentation1+This wiki page has moved to: [Introduction](./Configuration:-Introduction.md).
2-
3-You can find documentation for various sections of the config on these wiki pages:
4-
5-* [`input {}`](./Configuration:-Input.md)
6-* [`output "eDP-1" {}`](./Configuration:-Outputs.md)
7-* [`binds {}`](./Configuration:-Key-Bindings.md)
8-* [`switch-events {}`](./Configuration:-Switch-Events.md)
9-* [`layout {}`](./Configuration:-Layout.md)
10-* [top-level options](./Configuration:-Miscellaneous.md)
11-* [`window-rule {}`](./Configuration:-Window-Rules.md)
12-* [`layer-rule {}`](./Configuration:-Layer-Rules.md)
13-* [`animations {}`](./Configuration:-Animations.md)
14-* [`gestures {}`](./Configuration:-Gestures.md)
15-* [`debug {}`](./Configuration:-Debug-Options.md)
16-
17-### Loading
18-
19-Niri will load configuration from `$XDG_CONFIG_HOME/niri/config.kdl` or `~/.config/niri/config.kdl`, falling back to `/etc/niri/config.kdl`.
20-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.
21-Please use the default configuration file as the starting point for your custom configuration.
22-
23-The configuration is live-reloaded.
24-Simply edit and save the config file, and your changes will be applied.
25-This includes key bindings, output settings like mode, window rules, and everything else.
26-
27-You can run `niri validate` to parse the config and see any errors.
28-
29-To use a different config file path, pass it in the `--config` or `-c` argument to `niri`.
30-
31-You can also set `$NIRI_CONFIG` to the path of the config file.
32-`--config` always takes precedence.
33-If `--config` or `$NIRI_CONFIG` doesn't point to a real file, the config will not be loaded.
34-If `$NIRI_CONFIG` is set to an empty string, it is ignored and the default config location is used instead.
35-
36-### Syntax
37-
38-The config is written in [KDL].
39-
40-#### Comments
41-
42-Lines starting with `//` are comments; they are ignored.
43-
44-Also, you can put `/-` in front of a section to comment out the entire section:
45-
46-```kdl
47-/-output "eDP-1" {
48- // Everything inside here is ignored.
49- // The display won't be turned off
50- // as the whole section is commented out.
51- off
52-}
53-```
54-
55-#### Flags
56-
57-Toggle options in niri are commonly represented as flags.
58-Writing out the flag enables it, and omitting it or commenting it out disables it.
59-For example:
60-
61-```kdl
62-// "Focus follows mouse" is enabled.
63-input {
64- focus-follows-mouse
65-
66- // Other settings...
67-}
68-```
69-
70-```kdl
71-// "Focus follows mouse" is disabled.
72-input {
73- // focus-follows-mouse
74-
75- // Other settings...
76-}
77-```
78-
79-#### Sections
80-
81-Most sections cannot be repeated. For example:
82-
83-```kdl
84-// This is valid: every section appears once.
85-input {
86- keyboard {
87- // ...
88- }
89-
90- touchpad {
91- // ...
92- }
93-}
94-```
95-
96-```kdl,must-fail
97-// This is NOT valid: input section appears twice.
98-input {
99- keyboard {
100- // ...
101- }
102-}
103-
104-input {
105- touchpad {
106- // ...
107- }
108-}
109-```
110-
111-Exceptions are, for example, sections that configure different devices by name:
112-
113-<!-- NOTE: this may break in the future -->
114-```kdl
115-output "eDP-1" {
116- // ...
117-}
118-
119-// This is valid: this section configures a different output.
120-output "HDMI-A-1" {
121- // ...
122-}
123-
124-// This is NOT valid: "eDP-1" already appeared above.
125-// It will either throw a config parsing error, or otherwise not work.
126-output "eDP-1" {
127- // ...
128-}
129-```
130-
131-### Defaults
132-
133-Omitting most of the sections of the config file will leave you with the default values for that section.
134-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.
135-
136-### Breaking Change Policy
137-
138-As a rule, niri updates should not break existing config files.
139-(For example, the default config from niri v0.1.0 still parses fine on v25.02 as I'm writing this.)
140-
141-Exceptions can be made for parsing bugs.
142-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).
143-A patch release changed niri from silently accepting this to causing a parsing failure.
144-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.
145-
146-Keep in mind that the breaking change policy applies only to niri releases.
147-Commits between releases can and do occasionally break the config as new features are ironed out.
148-However, I do try to limit these, since several people are running git builds.
149-
150-[KDL]: https://kdl.dev/
wiki/Getting-Started.mdmodified+1 -1
@@ -17,7 +17,7 @@ Then it will open as a window, where you can give it a try.
17 Note that this windowed mode is mainly meant for development, so it is a bit buggy (in particular, there are issues with hotkeys).17 Note that this windowed mode is mainly meant for development, so it is a bit buggy (in particular, there are issues with hotkeys).
18 18
19 Next, see the [list of important software](./Important-Software.md) required for normal desktop use, like a notification daemon and portals.19 Next, see the [list of important software](./Important-Software.md) required for normal desktop use, like a notification daemon and portals.
20-Also, check the [configuration overview](./Configuration:-Overview.md) page to get started configuring niri.20+Also, check the [configuration introduction](./Configuration:-Introduction.md) page to get started configuring niri.
21 There you can find links to other pages containing thorough documentation and examples for all options.21 There you can find links to other pages containing thorough documentation and examples for all options.
22 Finally, the [Xwayland](./Xwayland.md) page explains how to run X11 applications on niri.22 Finally, the [Xwayland](./Xwayland.md) page explains how to run X11 applications on niri.
23 23
wiki/_Sidebar.mdmodified+1 -1
@@ -16,7 +16,7 @@
16 * [FAQ](./FAQ.md)16 * [FAQ](./FAQ.md)
17 17
18 ## Configuration18 ## Configuration
19-* [Overview](./Configuration:-Overview.md)19+* [Introduction](./Configuration:-Introduction.md)
20 * [Input](./Configuration:-Input.md)20 * [Input](./Configuration:-Input.md)
21 * [Outputs](./Configuration:-Outputs.md)21 * [Outputs](./Configuration:-Outputs.md)
22 * [Key Bindings](./Configuration:-Key-Bindings.md)22 * [Key Bindings](./Configuration:-Key-Bindings.md)