The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

Keyboard Input language Problems (Want to switch to Greek)

asked 2014-10-15 21:03:27 +0000

Deus Deceit gravatar image

I'm Greek, I use English mostly but when I want to type in Greek... I want to type in Greek. lol.

So how to add the Greek language and switch between English and Greeek with alt + shift?

In unity desktop that's already setup so I thought that these kind of settings were "cross dekstop". How to go about it?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-10-16 07:14:56 +0000

Adaephon gravatar image

updated 2014-10-17 06:00:10 +0000

If you add the following line to your i3 configuration it should work just like in Unity

exec --no-startup-id "setxkbmap -model pc105 -layout us,gr -option grp:alt_shift_toggle"

If you use some variant of the these layouts you can also add the -variant option. For example, -variant euro,simple will use the euro variant of the us layout and the simple variant for the gr layout (same order as -layout). In order to use the default variant just leave it out, so -variant euro, will use euro for us, but the default for gr.

Also the above line assumes that a default 105-key PC-keyboard will be used. If you use anything else change the model accordingly.

With setxkbmap -query you can see what is currently set. If you run it before adding the above line to the configuration, you can see what is set by Xorg.

There is also the chance that Unity is using the same method to set multiple layouts (I do not use Unity, so I cannot check). So if you log in with Unity and just run setxkbmap -query you might get everything you need to set layout changing for i3 the exact same way.

For example, the output

rules:      evdev
model:      pc105
layout:     us,gr
options:    grp:alt_shift_toggle

would translate to the above setxkbmap command.

Have a look on this Arch Linux Documentation for more information. The 'Setting keyboard layout' section works just as well with Ubuntu.

edit flag offensive delete link more


I did check with `setxkbmap -query` in unity and the model is the same, I put the line in my config file, but it didn't work. I read the arch wiki but it kinda says what you said too. Am I missing something?

Deus Deceit gravatar imageDeus Deceit ( 2014-10-16 13:12:18 +0000 )edit

Does it work if you run `setxkbmap -model pc105 -layout us,gr -option grp:alt_shift_toggle` from a terminal?

Adaephon gravatar imageAdaephon ( 2014-10-16 13:23:01 +0000 )edit

Yes, it does :/

Deus Deceit gravatar imageDeus Deceit ( 2014-10-16 13:52:20 +0000 )edit

Oh, my fault. You have to put the command in quotes because otherwise the `,` between layouts is interpreted by *i3* as separator between two commands. I've edited the answer accordingly.

Adaephon gravatar imageAdaephon ( 2014-10-17 06:02:40 +0000 )edit

Yep, that worked! Thank you very much

Deus Deceit gravatar imageDeus Deceit ( 2014-10-19 04:14:32 +0000 )edit

Question Tools


Asked: 2014-10-15 21:03:27 +0000

Seen: 3,303 times

Last updated: Oct 17 '14