I am trying to figure out how to use my .xinitrc file to load an xmodmap configuration file. Although this seems to be a popular problem around the internet, I can't seem to get it working. I am running Arch Linux and am using Gnome as my desktop environment. Initially, all that was in my .xinitrc file was
exec gnome-session. I have tried putting the xmodmap command (which works if I manually run it in a terminal) before and after the gnome-session command:
xmodmap ~/.xmodmap exec gnome-session
exec gnome-session xmodmap ~/.xmodmap
but neither worked. As suggested elsewhere on the internet, I also tried doing this with a sleep before the xmodmap command:
sleep 20 && xmodmap ~/.xmodmap exec gnome-session
exec gnome-session sleep 20 && xmodmap ~/.xmodmap
but neither worked.