You are not logged in.
I did my own keyboard layout by editing layout files in /usr/share/X11/xkb/symbols/* and /usr/share/X11/xkb/rules/*
then to load my layout I edited /etc/X11/xorg.conf.d/60-keyboard-layouts.conf
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,ru"
Option "XkbModel" "pc105"
Option "XkbVariant" "basic,my_layout"
Option "XkbOptions" "grp:alt_shift_toggle,lv3:ralt_switch_multikey"
EndSection
Obviously I would prefer not to mess with system files, how can I load my layouts from any directory,
but with a notion that I cannot use setxkbmap (layout resets each time I unplug my keyboard)
Offline
There are environment variables that affect keyboard-related stuff in X (and at least some wayland compositors, for that matter) - XKB_CONFIG_ROOT is probably what you need.
For more info check /usr/include/xkbcommon/*.h files.
Offline
run `setxkbmap -layout us,ru -option …` from whatever you start (.xinitrc, .xprofile …)
Offline