A local version of /etc/default/keyboard

Whenever I install a distro, one of the things I do is to change the caps lock key to be another ctrl key.

For i3wm, I’ve been doing this by changing XKBOPTIONS=“ctrl:nocaps” in /etc/default/keyboard.

I would rather do that locally and leave the /etc files alone.

How/where should I do that?

Thanks

Not a i3wm user but just wonder if adding something like:

/usr/bin/setxkbmap -option “ctrl:nocaps”

(not sure if " " is needed …)

to .xsessionrc under your home directory would work.

(Or to .xinitrc for that matter ? :thinking:)

My EOS-i3 installation doesn’t have .xsessionrc or .xinitrc.

I tried putting /usr/bin/setxkbmap -option “ctrl:nocaps” in .profile, but that didn’t seem to work

add it to the config:

~/.config/i3/config

exec --no-startup-id /usr/bin/setxkbmap -option “ctrl:nocaps”

You could create one.
However a better way is the one suggested by @joekamprad!

the config is somehow better as default eos-i3 is using lightdm to login not startx

1 Like

You are right!
I wrote:

:blush:

Thank you, joekamprad. That worked perfectly.

I’m embarrassed as there was a comment section in .config/i3/config that already had the answer to my question if I hadn’t glossed right over it :blush:

Thank you, pebcak, for your attempts to help me also

2 Likes

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