7

i'm new to i3wm and stuck with the config. I wanted to ask how can I change language in i3wm. I made some search and found some stuff but it's not working in my case. these are two ways that I found

# changing language
exec_always "setxkbmap -model pc104 -layout us,fa_IR -variant ,, -option 
grp:alt_shift_toggle"

and

exec "setxkbmap -layout en_US,fa_IR"
exec "setxkbmap -option 'grp:alt_shift_toggle'"

I thought maybe I'm not using the proper name for the persian keyboard layout and I don't know how to find the possible options of the languages. Would appreciate if you can help me sort this out

2 Answers 2

6

Everything looks more or less OK except for the layout names.

try using the following command to get list of supported keyboard layouts:

localectl list-x11-keymap-layouts

I used answer from this FAQ in the past: https://faq.i3wm.org/question/4761/keyboard-input-language-problems-want-to-switch-to-greek/index.html

The only difference is that my solution is for 104 keys keyboard and Russian layout.

Exact line that was working for me.

exec --no-startup-id "setxkbmap -model pc104 -layout us,ru -option grp:alt_shift_toggle"

You could rather run the command in quotes from command line(applies for the single session) or add to the ~/.config/i3/config and use $mod+Shift+c to refresh your config.

5

The name of the layout option for Persian is ir, use:

exec_always "setxkbmap -model pc104 -layout us,ir -variant ,, -option grp:alt_shift_toggle"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .