unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
To: help-guix@gnu.org
Subject: Execute startxbmap at login to map Ctrl Caps to Escape
Date: Thu, 16 Mar 2023 21:31:24 -0500	[thread overview]
Message-ID: <CAGxMbPYtbc6V9JWUUrVNnP2pO7xtr8RNNd=+wMx_YsNBeXK7EQ@mail.gmail.com> (raw)

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>

             reply	other threads:[~2023-03-17  2:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17  2:31 Rodrigo Morales [this message]
2023-03-17  2:46 ` Execute startxbmap at login to map Ctrl Caps to Escape Mario Forzanini
     [not found]   ` <CAGxMbPZOwaw8WzOqEXkcjy8sH-94DTSLy1XVK0kZQM0Vb9H01g@mail.gmail.com>
2023-03-17 12:40     ` Mario Forzanini
2023-03-17 15:05 ` Gary Johnson

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='CAGxMbPYtbc6V9JWUUrVNnP2pO7xtr8RNNd=+wMx_YsNBeXK7EQ@mail.gmail.com' \
    --to=moralesrodrigo1100@gmail.com \
    --cc=help-guix@gnu.org \
    /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).