diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-26 08:12:55 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-26 08:12:55 +0400 |
| commit | 26c48240471898c87f9b67fef66297e2e5a4c060 (patch) | |
| tree | c48bbe3f130868e8aa40ceb9c8486df3c2684d24 /wiki/Configuration:-Overview.md | |
| parent | 78dbb2308e9a86186e781f078d0c3503dbf753aa (diff) | |
| download | niri-26c48240471898c87f9b67fef66297e2e5a4c060.tar.gz niri-26c48240471898c87f9b67fef66297e2e5a4c060.tar.bz2 niri-26c48240471898c87f9b67fef66297e2e5a4c060.zip | |
wiki: Input and more Overview
Diffstat (limited to 'wiki/Configuration:-Overview.md')
| -rw-r--r-- | wiki/Configuration:-Overview.md | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/wiki/Configuration:-Overview.md b/wiki/Configuration:-Overview.md index ea8f6561..15acb2ef 100644 --- a/wiki/Configuration:-Overview.md +++ b/wiki/Configuration:-Overview.md @@ -15,6 +15,9 @@ To use a different config file path, pass it in the `--config` or `-c` argument ### Syntax The config is written in [KDL]. + +#### Comments + Lines starting with `//` are comments; they are ignored. Also, you can put `/-` in front of a node to comment out the entire node: @@ -26,6 +29,79 @@ Also, you can put `/-` in front of a node to comment out the entire node: } ``` +#### 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: + +``` +// "Focus follows mouse" is enabled. +input { + focus-follows-mouse + + // Other settings... +} +``` + +``` +// "Focus follows mouse" is disabled. +input { + // Other settings... +} +``` + +#### Sections + +Most sections cannot be repeated. For example: + +``` +// This is valid: every section appears once. +input { + keyboard { + // ... + } + + touchpad { + // ... + } +} +``` + +``` +// This is NOT valid: input section appears twice. +input { + keyboard { + // ... + } +} + +input { + touchpad { + // ... + } +} +``` + +Exceptions are for example sections that configure different devices by name: + +``` +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. |
