add option to set xkb config from file (#1062)

* add option to set xkb config from file

* Apply suggestions from code review

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
This commit is contained in:
may
2025-01-30 14:50:05 +01:00
committed by GitHub
parent fb5fedbf24
commit e412a0fc6b
3 changed files with 65 additions and 5 deletions
+16
View File
@@ -17,6 +17,7 @@ input {
// options "compose:ralt,ctrl:nocaps"
// model ""
// rules ""
// file "~/.config/keymap.xkb"
}
// repeat-delay 600
@@ -112,6 +113,21 @@ input {
}
```
> [!TIP]
>
> Alternatively you can directly set a path to a .xkb file containing an xkb keymap.
> This overrides all other xkb settings
>
> ```kdl
> input {
> keyboard {
> xkb {
> file "~/.config/keymap.xkb"
> }
> }
> }
> ```
When using multiple layouts, niri can remember the current layout globally (the default) or per-window.
You can control this with the `track-layout` option.