[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Execute startxbmap at login to map Ctrl Caps to Escape
From: |
Rodrigo Morales |
Subject: |
Execute startxbmap at login to map Ctrl Caps to Escape |
Date: |
Thu, 16 Mar 2023 21:31:24 -0500 |
Table of Contents
_________________
1. The context
2. The question
3. Additional information
1 The context
=============
I've been using Guix for around 1 month. I'd previously used Arch
Linux. In Arch Linux, I mapped Caps Lock to Ctrl by inserting the
following statement in my ~/.xinitrc file (see code block below)
,----
| #!/bin/bash
|
| setxkbmap -option 'ctrl:nocaps' -layout us
|
| exec i3
`----
The `~/.xinitrc' file was read by `startx', as you can see in the last
line of the file `~/.profile' (see code block below)
,----
| (...)
|
| startx ~/.xinitrc
`----
In Guix, I'm using Emacs with EXWM and I want to map Caps Lock to
Escape as I did in Arch in Linux. I don't necessarily want to execute
`startx' or `xinitrc'. I'm happy with whatever solution that guarantee
that the `setxbmap' command is executed.
2 The question
==============
What's the Guix way to map Caps Lock to Escape?
3 Additional information
========================
I found [this(1)] message in help-guix from 22 Mar 2021, someone
states that it has never been simple to use `xinit' or `startx' in
Guix.
I also found [this(2)] thread in help-guix started in 21 Aug 2021,
where someone reports that startx was not working.
To me, all seems to indicate that I shouldn't try to use `startxkbmap'
in `~/.xinitrc' (so that it can be read by `startx' or `xinitrc'), so
I'm sure there must be a more proper way.
I could also insert the following statement in my `init.el' file (see
code block below), but this solution doesn't look clean to me. When I
switch to i3, this solution wouldn't work.
,----
| (start-process "*foo*" nil "setxkbmap" "-option" "ctrl:nocaps"
"-layout" "us")
`----
[this(1)] <https://www.mail-archive.com/help-guix@gnu.org/msg11418.html>
[this(2)] <https://www.mail-archive.com/help-guix@gnu.org/msg12256.html>
- Execute startxbmap at login to map Ctrl Caps to Escape,
Rodrigo Morales <=