The first line runs xfce4-xkb-plugin. After that, the layout begins to be propagated into the virtual machines.
The second one adjusts the necessary layouts. `-variant ','` must consist of keyboard variants (e.g. qwerty) separated by commas: one variant for each layout. A blank option means that the default option will be used. `-option ''` clears the entire list of options that was previously set. After that, `-option 'grp:alt_shift_toggle'` adds an option to change the layout.
You can see your previous layout settings from xfce in `.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml`. I think you can even improve the code to automatically import these values in the i3 config. This will allow you to configure layouts via the GUI - xfce4-keyboard-settings.
| The line runs xfce4-xkb-plugin. After that, the layout begins to be propagated into the virtual machines.
Next, you need to [set up your keyboard layouts](https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/basic-system-configuration/System_Locale_and_Keyboard_Configuration/):
```
localectl set-x11-keymap us,sr pc105 , grp:alt_shift_toggle
```
The command persistently adjusts the necessary layouts.
The first argument `LAYOUT` set the keyboard layouts. You can see the list of all available layouts through `localectl list-keymaps`
The second argument is `MODEL`. I just put the value from output of `setxkbmap -query`.
The third argument `VARIANT` that equals a comma `,` must consist of keyboard variants (e.g. qwerty) separated by commas: one variant for each layout. The blank variant means "use default". So the comma means "default variant for us, default variant for sr".
You can see your previous layout settings from xfce in `.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml`.
|