Update switchxkblayout section (#156)

This commit is contained in:
milkknife 2023-03-13 21:48:26 +01:00 committed by GitHub
parent 30d164e00d
commit 285c2c02aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,11 +125,32 @@ device:my-epic-keyboard-v1 {
You can use this command to switch between them. You can use this command to switch between them.
``` ```sh
hyprctl switchxkblayout [DEVICE] [CMD] hyprctl switchxkblayout [DEVICE] [CMD]
``` ```
where `CMD` is either `next` for next, `prev` for previous, or `ID` where `CMD` is either `next` for next, `prev` for previous, or `ID`
for a specific one (in the above case, `us`: 0, `pl`: 1, `de`: 2) for a specific one (in the above case, `us`: 0, `pl`: 1, `de`: 2).
You can find the `DEVICE` using `hyprctl devices` command.
example command for a typical keyboard:
```sh
hyprctl switchxkblayout at-translated-set-2-keyboard next
```
{{< hint >}}
If you want a single variant ie. pl/dvorak on one layout but us/qwerty on the other, xkb parameters can still be blank, however the amount of comma-separated parameters have to match. Alternatively, a single parameter can be specified for it to apply to all three.
```ini
input {
kb_layout = pl,us,ru
kb_variant = dvorak,,
kb_options = caps:ctrl_modifier
}
```
{{< /hint >}}
### seterror ### seterror