forge
Explore
Log in

Don't you dare go Hollow

Mention localectl in the docs

Browse files at this commit

5ac440a7604ce6765ce802cb1fd53c906d8d18ecIvan MolodetskikhParent: 0e3d078
resources/default-config.kdlmodified+2 -1
@@ -17,7 +17,8 @@ input {
17 // options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"17 // options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
18 18
19 // If this section is empty, niri will fetch xkb settings19 // If this section is empty, niri will fetch xkb settings
20- // from org.freedesktop.locale1.20+ // from org.freedesktop.locale1. You can control these using
21+ // localectl set-x11-keymap.
21 }22 }
22 23
23 // Enable numlock on startup, omitting this setting disables it.24 // Enable numlock on startup, omitting this setting disables it.
wiki/Configuration:-Input.mdmodified+21 -0
@@ -149,6 +149,27 @@ input {
149 >149 >
150 > 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.150 > 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.
151 > This way, for example, system installers can dynamically set the niri keyboard layout.151 > This way, for example, system installers can dynamically set the niri keyboard layout.
152+> You can see this layout in `localectl` and change it with `localectl set-x11-keymap`, for example:
153+>
154+> ```sh
155+> $ localectl set-x11-keymap "us" "" "colemak_dh_ortho" "compose:ralt,ctrl:nocaps"
156+> $ localectl
157+> System Locale: LANG=en_US.UTF-8
158+> LC_NUMERIC=ru_RU.UTF-8
159+> LC_TIME=ru_RU.UTF-8
160+> LC_MONETARY=ru_RU.UTF-8
161+> LC_PAPER=ru_RU.UTF-8
162+> LC_MEASUREMENT=ru_RU.UTF-8
163+> VC Keymap: us-colemak_dh_ortho
164+> X11 Layout: us
165+> X11 Variant: colemak_dh_ortho
166+> X11 Options: compose:ralt,ctrl:nocaps
167+> ```
168+>
169+> By default, `localectl` will set the TTY keymap to the closest match of the XKB keymap.
170+> You can prevent that with a `--no-convert` flag, for example: `localectl set-x11-keymap --no-convert "us,ru"`.
171+>
172+> These settings are picked up by some other programs too, like GDM.
152 173
153 When using multiple layouts, niri can remember the current layout globally (the default) or per-window.174 When using multiple layouts, niri can remember the current layout globally (the default) or per-window.
154 You can control this with the `track-layout` option.175 You can control this with the `track-layout` option.