From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MA2AMw6EFGTwEgEASxT56A (envelope-from ) for ; Fri, 17 Mar 2023 16:15:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uIxuMw6EFGRB6gAAauVa8A (envelope-from ) for ; Fri, 17 Mar 2023 16:15:26 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7B47018A4A for ; Fri, 17 Mar 2023 16:15:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdBnP-0000uv-2L; Fri, 17 Mar 2023 11:15:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdBnL-0000uZ-Fi for help-guix@gnu.org; Fri, 17 Mar 2023 11:15:04 -0400 Received: from knopi.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdBnI-0003vE-Ee for help-guix@gnu.org; Fri, 17 Mar 2023 11:15:02 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 8B889445F8; Fri, 17 Mar 2023 16:14:56 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AoeruntOp7ku; Fri, 17 Mar 2023 16:14:52 +0100 (CET) References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1679066092; bh=PtGWxPZHN7FGn85J4VhAT3jMoWdscV3SJbcsNgP7au4=; h=References:Date:From:To:Cc:Subject:In-reply-to; b=bK3xSroDLG1bDufs3dTAfdx1OgZVox2H/tZWTPxRFV0cZZacxjn9gQWs6smMP2vjb KK7vvlLX8wY1f2aKh5qdCLqL5Is1z7fsosBdn0N+m56tAnJsNH4MLpj6k0ez1os2Xk TRLVEXQYCAA52oxoXA9fFcFOZWNgbgJJksRN5qVqlOqGe4eKJo5XvObxjuuvaeAhkb ch1VI+m1eSScJfQIxfyWgFwKRCVNl58dSBqWeEv7QMDGYS9ZemD0i9x4ZzNzD9gDIa jABkPDrzDqlfaDw9UmTIbGEMe7tod70vTLG650fChw0ZDogGZrK6GbdLzMswymr1eM E67kuWLApxLRg== Date: Fri, 17 Mar 2023 11:05:48 -0400 From: Gary Johnson To: Rodrigo Morales Cc: help-guix@gnu.org Subject: Re: Execute startxbmap at login to map Ctrl Caps to Escape In-reply-to: Message-ID: <87ileztno6.fsf@disroot.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=178.21.23.139; envelope-from=lambdatronic@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=bK3xSroD; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=reject) header.from=disroot.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679066126; a=rsa-sha256; cv=none; b=N64j0tn5KmWYFRtxKvNP+dxKKDZF0APN8Os0YIzplA4Dvkh/jIL0gsQnF7h6XVoc2vG/di 77FXqyr74zG5f+kr1sl/r5nT1JbYEeVwZ/6gdvZ5UfWEYMgDLk73vjWJVab9Nfs459/bxa JEFMJYiAh8YZpDjge22jGZ9F+9RsTyb5OIc1dI0DlQiJkfpAdDMtW66o8NjFuFUTGgcTT1 n82wCmnSpRqPCBJisQAhgBw9rNvhiZklql8audBB2bp/RfP931+ZqYbxb/Q+H4jxyrb0yx +UZSSE6RkXeIkLzFJWG9l0DUbcDlFotQM0aEE92OkR3qvKe6WCvgCuHquQd8BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679066126; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=T6g5oarYptFNVIuZIEGsWvsohVHJl5iFrSGzBi0WD8s=; b=qbVOp0UkKzIWX3zicK7s25+PeSngwbDaUkSZV2op4iiPHVOUxAqP7K4GmCdFYfb+TTdLwj QXRHlkPzitl6yoHtbJYdfngSgQObfGomBnXZOIC5w7OYzI5hiWF4oTfduW6Um94s9xTQbN ObxVvjJ5G6DWMTtNJgsq6KIADkCfLqLgmumgrHwKtf78PdYZOPktMyPFw/Ff3L4VAdpwSJ NeR1tlrdbVOLOzvzDd6bcRLFabnxR4LnH3UtaB+lHajGFMZKBpF72BXjyP7sXnJDZV105t R9SQbVbVKskpEnDuLgJqOdFdS8BWDcO9QUnC65kI6AHtObdaXzO4Sg3fL39arQ== X-Migadu-Spam-Score: -6.47 X-Spam-Score: -6.47 X-Migadu-Queue-Id: 7B47018A4A X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=bK3xSroD; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=reject) header.from=disroot.org X-TUID: hUu3hzQKKGsm Rodrigo Morales 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