Solved Setxkbmap .xinitrc

sk8harddiefast

Daemon

Reaction score: 201
Messages: 2,157

I need some little help. How to syntax setxkbmap on .xinitrc to have us and gr layouts and change them with alt+shift on a window manager?
I tried that:
Code:
setxkbmap -layout "us,gr"  -option "grp:alt_shift_toggle"
but didn't work
 

shepper

Aspiring Daemon

Reaction score: 311
Messages: 859

Re: Setxkbmap .xinitrc

You could have a number of problems. If the command runs from a terminal it would suggest that the syntax of your ~/.xinitrc is incorrect. The Arch Linux wiki indicates that some desktop's will override the settings.

I would start by running the command in a terminal to verify that the code functions. If it does review your ~/.xinitrc and post it here. The Arch wiki also gives an alternative with /etc/X11/xorg.conf.d/10-keyboard.conf but setxkbmap seems to be the most straight forward if you are running a simple window manager.
 
OP
sk8harddiefast

sk8harddiefast

Daemon

Reaction score: 201
Messages: 2,157

Re: Setxkbmap .xinitrc

I found it! I created a folder named xorg.conf.d into /etc/X11. Then I created a file named 10-keyborad.conf and add this line:

Code:
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,gr"
        Option "XkbModel" "pc105"
        Option "XkbOptions" "grp:ctrl_alt_toggle"
EndSection

Now using control+alt I can switch to Greek on dwm window manager :beergrin
 

DenisVS

Member

Reaction score: 6
Messages: 28

The Arch Linux wiki indicates that some desktop's will override the settings.
Where I can find the all places which corrupt my configuration?
My DM is Mate, but in attempt to enable the compose key I installed gnome-tweaks too.
The stock settings of mate have no effect.
 
Top