Keep compose key setting with setxkbmap after reboot

Hello.

I recently switched from KDE to i3 with my new and smaller laptop. Due to it being a 13' display the keyboard doesn't have a numpad and without it I can't insert an Em dash ( – ) by pressing Alt+unicode. I spent an hour searching how to type it and found out that by pressing the (compose key)+x3(minus button) I can insert the character.

Now, my problem lies with the i3 version of manjaro, I don't have a default compose key in it. I read in another post that if I type $ grep "compose:" /usr/share/X11/xkb/rules/base.lst and set it with setxkbmap -option compose:<desired key>in the terminal, it enables the compose key function but only for the session until I reboot, then I have to use the terminal again to set those commands every time.

Reading the Arch Wiki I saw that it's possible to make those changes permanent with xinit and xmodmap but I can't figure out how (I'm a complete noob). If anyone could help me with the script would be a godsend.

I had same issue.
I added setxkbmap -option compose:ralt to ~/.profile and it works every boot.

I tried adding the code to ~/.profile and rebooting, didn't have any effect. Went to research why would mi .profile might not be working, found out that it could work with ~/.bash_profile, tried the same and nothing, even with ~/.xinitrc and nothing. There has to be something on my configuration that is not letting those files run on startup even though they are the ones launching i3, Xorg, etc.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by