diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-07-15 18:36:16 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-07-15 18:38:00 +0300 |
| commit | 5ac440a7604ce6765ce802cb1fd53c906d8d18ec (patch) | |
| tree | 083afef3c398f52448e114e8cc132dee84a08caf | |
| parent | 0e3d078a85cec867aa3f49b9fe3d1261e36eb901 (diff) | |
| download | niri-5ac440a7604ce6765ce802cb1fd53c906d8d18ec.tar.gz niri-5ac440a7604ce6765ce802cb1fd53c906d8d18ec.tar.bz2 niri-5ac440a7604ce6765ce802cb1fd53c906d8d18ec.zip | |
Mention localectl in the docs
| -rw-r--r-- | resources/default-config.kdl | 3 | ||||
| -rw-r--r-- | wiki/Configuration:-Input.md | 21 |
2 files changed, 23 insertions, 1 deletions
diff --git a/resources/default-config.kdl b/resources/default-config.kdl index f2fa8609..a053f122 100644 --- a/resources/default-config.kdl +++ b/resources/default-config.kdl @@ -17,7 +17,8 @@ input { // options "grp:win_space_toggle,compose:ralt,ctrl:nocaps" // If this section is empty, niri will fetch xkb settings - // from org.freedesktop.locale1. + // from org.freedesktop.locale1. You can control these using + // localectl set-x11-keymap. } // Enable numlock on startup, omitting this setting disables it. diff --git a/wiki/Configuration:-Input.md b/wiki/Configuration:-Input.md index 861bd207..c9ca0ba2 100644 --- a/wiki/Configuration:-Input.md +++ b/wiki/Configuration:-Input.md @@ -149,6 +149,27 @@ input { > > If the `xkb` section is empty (like it is by default), niri will fetch xkb settings from systemd-localed at `org.freedesktop.locale1` over D-Bus. > This way, for example, system installers can dynamically set the niri keyboard layout. +> You can see this layout in `localectl` and change it with `localectl set-x11-keymap`, for example: +> +> ```sh +> $ localectl set-x11-keymap "us" "" "colemak_dh_ortho" "compose:ralt,ctrl:nocaps" +> $ localectl +> System Locale: LANG=en_US.UTF-8 +> LC_NUMERIC=ru_RU.UTF-8 +> LC_TIME=ru_RU.UTF-8 +> LC_MONETARY=ru_RU.UTF-8 +> LC_PAPER=ru_RU.UTF-8 +> LC_MEASUREMENT=ru_RU.UTF-8 +> VC Keymap: us-colemak_dh_ortho +> X11 Layout: us +> X11 Variant: colemak_dh_ortho +> X11 Options: compose:ralt,ctrl:nocaps +> ``` +> +> By default, `localectl` will set the TTY keymap to the closest match of the XKB keymap. +> You can prevent that with a `--no-convert` flag, for example: `localectl set-x11-keymap --no-convert "us,ru"`. +> +> These settings are picked up by some other programs too, like GDM. 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. |
