From: Gary Johnson <lambdatronic@disroot.org>
To: Rodrigo Morales <moralesrodrigo1100@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: Execute startxbmap at login to map Ctrl Caps to Escape
Date: Fri, 17 Mar 2023 11:05:48 -0400 [thread overview]
Message-ID: <87ileztno6.fsf@disroot.org> (raw)
In-Reply-To: <CAGxMbPYtbc6V9JWUUrVNnP2pO7xtr8RNNd=+wMx_YsNBeXK7EQ@mail.gmail.com>
Rodrigo Morales <moralesrodrigo1100@gmail.com> writes:
> 1 The context
> =============
>
> 8<---------------------------------------------------------------->8
> ...TEXT ELIDED...
> 8<---------------------------------------------------------------->8
>
> 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?
Hi Rodrigo,
A thoroughly Guix way to do this would probably be to just set the
`keyboard-layout` property in your operating system record like so:
```system.scm
(operating-system
...
(keyboard-layout (keyboard-layout "emacs"))
...)
```
This should update the keymap at your tty sessions, but I'm not sure if
it will propagate into your X session. Perhaps someone else here has
tried it?
I also run EXWM as my window manager on Guix System, and I've addressed
this keymapping issue by just inserting it into my $HOME/.xsession file
like so:
```.xsession
# Change cursor to left arrow
xsetroot -cursor_name left_ptr
# Set keyboard repeat rate
xset r rate 200 60
# Change Caps Lock to Ctrl
setxkbmap -option "ctrl:nocaps"
setxkbmap -option "terminate:ctrl_alt_bksp"
# Start Emacs with the exwm script:
exwm
```
Have fun and happy hacking!
Gary
--
=======================================================================
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
Why is HTML email a security nightmare? See https://useplaintext.email/
Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
prev parent reply other threads:[~2023-03-17 15:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 2:31 Execute startxbmap at login to map Ctrl Caps to Escape Rodrigo Morales
2023-03-17 2:46 ` Mario Forzanini
[not found] ` <CAGxMbPZOwaw8WzOqEXkcjy8sH-94DTSLy1XVK0kZQM0Vb9H01g@mail.gmail.com>
2023-03-17 12:40 ` Mario Forzanini
2023-03-17 15:05 ` Gary Johnson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ileztno6.fsf@disroot.org \
--to=lambdatronic@disroot.org \
--cc=help-guix@gnu.org \
--cc=moralesrodrigo1100@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).