From 285c2c02aaf1c4826f263741f5d4d705b9ca0c34 Mon Sep 17 00:00:00 2001 From: milkknife <111794344+milkknife@users.noreply.github.com> Date: Mon, 13 Mar 2023 21:48:26 +0100 Subject: [PATCH] Update switchxkblayout section (#156) --- pages/Configuring/Using-hyprctl.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/pages/Configuring/Using-hyprctl.md b/pages/Configuring/Using-hyprctl.md index 328b861..8c47980 100644 --- a/pages/Configuring/Using-hyprctl.md +++ b/pages/Configuring/Using-hyprctl.md @@ -125,11 +125,32 @@ device:my-epic-keyboard-v1 { You can use this command to switch between them. -``` +```sh hyprctl switchxkblayout [DEVICE] [CMD] ``` 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