Stand With Ukraine

Sunday, December 15, 2024

i3 (EndeavouOS edition): Multiple keyboard layouts

Here I will show you how to add a ukrainian keyboard layout to an existing layout (in this case us), so you can type using different languages.
  • First add the following to your ~/.config/i3/config file:
    # add layouts
    exec setxkbmap -layout us,ua
    # set a switching shortcut
    exec setxkbmap -option 'grp:alt_shift_toggle'
    
  • Now we want to show the current layout in the system tray (this might be distribution dependent, I guess). EndeavourOS provides some ready scripts for which I needed to install dependencies and uncomment some lines in the ~/.config/i3/i3blocks.config.
    • Install dependencies
      yay xkblayout-state
      
    • Uncomment the following block in ~/.config/i3/i3blocks.config:
      [keyboard-layout]
      command=~/.config/i3/scripts/keyboard-layout
      interval=2
      
Here is the screenshot of the way my env looks right now.



No comments: