Managing switch keyboard layouts

Today was my first encounter with this Arch build and it was love from the first sight. Styles, color palette, fonts, themes everything is perfectly balanced, nice job! I tried one of community build for solid experience and basically setup is usable out of the box with few tweaks to make. Thats what took me all evening - figuring out, how to manage keys layouts with no GUI settings, and without installing a plugin with 3 buttons gettings 100500 useless dependencies. The solution is elegant and simple, and its in arch wiki, but only in russian version of it, maybe thats thats the reason i spend so much time. There are 2 main ways

$ setxkbmap [-model xkb_model] [-layout xkb_layout] [-variant xkb_variant] [-option xkb_options]

using [setxkbmap]

$ setxkbmap xkb_layout

but its way too to change input language while typing, so u can add more opttions

$ setxkbmap -model pc105 -layout us,ru -variant dvorak, -option grp:alt_shift_toggle

anyways all these settings erase every time u change user, and that was the end of the story “pepesad”
Until i found some scripting patterns and guild from russian hacker Ivan, exclusively
Just past here /etc/X11/xorg.conf.d/00-keyboard.conf

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,ru"
        Option "XkbModel" "pc105"
        Option "XkbVariant" "dvorak,"
        Option "XkbOptions" "grp:alt_shift_toggle"
EndSection

Hopefully you can get the rest how to configure this to yyour needs, works like swiss clock, enjoy!

2 Likes

Welcome to EndeavourOS . forum + :pray: try out community edition.

1 Like

Welcome to the forum @comrade1488 :partying_face: :tada: :balloon: