From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2MztOg9hRmWReQEAG6o9tA:P1 (envelope-from ) for ; Sat, 04 Nov 2023 16:19:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2MztOg9hRmWReQEAG6o9tA (envelope-from ) for ; Sat, 04 Nov 2023 16:19:44 +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 900F5437C8 for ; Sat, 4 Nov 2023 16:19:43 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=ekfgSsWX; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699111183; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=k0rpLMqMJvDQtep1g7LHkGi1A8Zo1THYZ+jsusSH8kc=; b=KQRKaxGseQFzp79KEKwdvquLiuxHTLd6citPrrRujJBD1jEnMeRJlr/orpYafJsErqvY2v 7ZNaLpyvPITGHVVbNhljjbq9JeFC+1Mz9ZZ7ukTwdDzeUyoNhv/xrbMV6JnGyomekGTASM ne2gaNzlkKlhAIqzxXAxR3a4Ng+KVEyAkOcIjqyQkZP2nCmlZHuBiRa3SOeiHN3rPudlOW g80mQmqso4D5XR3LlTd7a7MniTH+EIul8B7YMJLU28l8RQ56w3qP8F3Qz81Gcjj5m9Go71 Kmp99o8O14c+zutLuoIpd1SffWAgSQlYr7WNzxOsNPxxZOHW56q//e10MqnX5g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=ekfgSsWX; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699111183; a=rsa-sha256; cv=none; b=WjpFuvzrPqZgoif/WDQxWUoYnAT/Qoi4w8ckwDTK+yUMi5+kkuudJkcRySfEFL3CxXc55e /eeZl2eqqigJlypkzcozEZhjG8uXYH40jDNrSiFX50MBMijK+MTyks1ACKJBPtrMDQxEsd EACnQGF967vMg2mrFWD/kJQVU6YNUAkKYITdbemqE/O6SUMGWbEQgD6v9jZKv722e+ygvw mu2cIdzSIy4qiPCCiZaH2FMFLxKNOHpPoVfAQv+qUTWOiWt+apqSlJ15gEaxtrphZb38pS F3EaQvTuAeo8CtVDGmBENr+59bLCwx7h5u/EVFOmgaZ6n+8lbmq67iwSj9Ca2w== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzIQp-0003pf-Ns; Sat, 04 Nov 2023 11:19:27 -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 1qzIQn-0003pQ-MD for guix-patches@gnu.org; Sat, 04 Nov 2023 11:19:25 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzIQn-0001GB-Eh for guix-patches@gnu.org; Sat, 04 Nov 2023 11:19:25 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qzIRN-0005mR-Jk for guix-patches@gnu.org; Sat, 04 Nov 2023 11:20:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66932] [PATCH] services: Add xremap service. Resent-From: =?UTF-8?Q?V=C3=96R=C3=96SK=C5=90I_?= =?UTF-8?Q?Andr=C3=A1s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Nov 2023 15:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66932 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66932@debbugs.gnu.org Cc: =?UTF-8?Q?V=C3=96R=C3=96SK=C5=90I_?= =?UTF-8?Q?Andr=C3=A1s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169911114422137 (code B ref -1); Sat, 04 Nov 2023 15:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Nov 2023 15:19:04 +0000 Received: from localhost ([127.0.0.1]:35591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzIQR-0005ky-LY for submit@debbugs.gnu.org; Sat, 04 Nov 2023 11:19:04 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzIQO-0005kT-S4 for submit@debbugs.gnu.org; Sat, 04 Nov 2023 11:19:02 -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 1qzIPi-0003lf-Uj for guix-patches@gnu.org; Sat, 04 Nov 2023 11:18:18 -0400 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzIPg-0001Bp-Ue for guix-patches@gnu.org; Sat, 04 Nov 2023 11:18:18 -0400 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2c5028e5b88so42774581fa.3 for ; Sat, 04 Nov 2023 08:18:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699111095; x=1699715895; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=STFoWm0JOnNe5L/uTnUaIJ9JXXkgxDjqHIJJQTf+WG0=; b=ekfgSsWXuyQLAzmBGilnrZ12tIHXlWd5uOY0dbeeUJ4MtIBZZFitys8dnaew0rxhZk ubG0uv+OW8Nus5M+Ev0psrHKsulWIZADC21TTillm+Kh8itT/l3jsJoBcUhdUlKNPOrB Q7qmtKyPiYJg1Vt0AqrOwGo+L/QJsQMdXS+lWCjlFY9QvAXpKXJS22pT2Oq/3NaSsAli ARGlh/aJVDuNtgysMtGGDTzTwvs+LjWMBer4qFtA6H7WpHnZWhccQi+GtT3jNEdI2+5T HatjvVEQDtc2fyFcjkf/LJZD02tmRZRTfxU49aipHmEgXEQ6DftHNfb0ngWOq/LAmJ3Z 0+Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699111095; x=1699715895; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=STFoWm0JOnNe5L/uTnUaIJ9JXXkgxDjqHIJJQTf+WG0=; b=rEMG1XXPudORTwL9H2geCveB+49gWv/ABAz4KuCwhfBbaeqnBx3YbBx+E373n3kJWm EKBDAyqy75+b/AruUbTZIl3gIij+try9r91WBWbYcRe9qiGGVkfRERkX7iiqAfjVZbVD 47Dbq4XF2iZLXI6rOcoMvy/hYJm2462PJLD8W/FGk0vFQ7KOmqmwjTBpEIoNULuOuHYi +UslW8yJIMwDxiuK7plpD4NXeIMGIs+co+Zc9hpmh3DLHRJHHjVMml5kjpLk3RF56uxw 16HvbUfCi5STaKbeXGkwsm9QeXCQcLqkYcpkw7uZFR0SfjppuorZ8r9/gyP8vsUTSxLw fdtg== X-Gm-Message-State: AOJu0YxI4fbT5rw0hzrZxiJoK4zKPywx734teqr+VLre4pR+DYDPIizh Y9Y8amvYYHsgGkUH3C2FZaCnCS8WFDA= X-Google-Smtp-Source: AGHT+IEoZxP1nn3fTwKe2OP7FRoGUNvFds4xbz9D/IqaFKGDuAb18iGmQXuCkWqozw64NKkigp6/6A== X-Received: by 2002:a2e:9410:0:b0:2c4:fe14:a85 with SMTP id i16-20020a2e9410000000b002c4fe140a85mr21527420ljh.18.1699111094309; Sat, 04 Nov 2023 08:18:14 -0700 (PDT) Received: from localhost (87-97-126-39.pool.digikabel.hu. [87.97.126.39]) by smtp.gmail.com with ESMTPSA id 10-20020a05600c230a00b004068495910csm6117100wmo.23.2023.11.04.08.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 08:18:13 -0700 (PDT) From: =?UTF-8?Q?V=C3=96R=C3=96SK=C5=90I_?= =?UTF-8?Q?Andr=C3=A1s?= Date: Sat, 4 Nov 2023 16:17:35 +0100 Message-ID: <57d94dcb19152592014053ef0bc81e95e4f6b602.1699111054.git.voroskoi@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=voroskoi@gmail.com; helo=mail-lj1-x232.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 3.89 X-Spam-Score: 3.89 X-Migadu-Queue-Id: 900F5437C8 X-Migadu-Scanner: mx13.migadu.com X-TUID: WP3/lB/1RHIE * gnu/services/desktop.scm (): New record. (xremap-shepherd-service): New procedure. (xremap-service-type): New variable. * doc/guix.texi (Desktop Services): Document this. Change-Id: I76f9e238c72fb47226140e2b86dd9490cd9c9351 --- doc/guix.texi | 37 ++++++++++++++++++++++++++++++++++++ gnu/services/desktop.scm | 41 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index b90078be06..e61b4e2650 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -119,6 +119,7 @@ Copyright @copyright{} 2023 Zheng Junjie@* Copyright @copyright{} 2023 Brian Cully@* Copyright @copyright{} 2023 Felix Lechner@* +Copyright @copyright{} 2023 VÖRÖSKŐI András@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -25011,6 +25012,42 @@ Desktop Services @end table @end deftp +@defvar xremap-service-type +@uref{https://github.com/k0kubun/xremap/, xremap} xremap is a key remapper for +Linux. Unlike xmodmap, it supports app-specific remapping and Wayland. + +@lisp +(append + (list + (service xremap-service-type + (xremap-configuration + (config-file (plain-file "xremap.yml" +"modmap: + - name: Global + remap: + CAPSLOCK: + held: CONTROL_L + alone: Esc + alone_timeout_millis: 1000")))) + + ;; normally one would want %base-services + %base-services) + +@end lisp +@end defvar + +@deftp {Data Type} xremap-configuration +Configuration record for the xremap daemon service. + +@table @asis +@item @code{package} (default: @code{rust-xremap}) +The xremap package to use. + +@item @code{config-file} (default: @samp{(plain-file "xremap.yml" "")}) +Config file to use with xremap. + +@end table +@end deftp @node Sound Services @subsection Sound Services diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 5b79fbcda1..1cfa7c2169 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021, 2022 muradm ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2023 VÖRÖSKŐI András ;;; ;;; This file is part of GNU Guix. ;;; @@ -72,6 +73,7 @@ (define-module (gnu services desktop) #:use-module (gnu packages mate) #:use-module (gnu packages nfs) #:use-module (gnu packages enlightenment) + #:use-module (gnu packages rust-apps) #:use-module (guix deprecation) #:use-module (guix records) #:use-module (guix packages) @@ -184,6 +186,9 @@ (define-module (gnu services desktop) seatd-configuration seatd-service-type + xremap-configuration + xremap-service-type + %desktop-services)) ;;; Commentary: @@ -1863,6 +1868,42 @@ (define seatd-service-type (service-extension shepherd-root-service-type seatd-shepherd-service))) (default-value (seatd-configuration)))) +;;; +;;; xremap +;;; + +(define-record-type* + xremap-configuration make-xremap-configuration + xremap-configuration? + (package xremap-configuration-package + (default rust-xremap)) + (config-file xremap-configuration-config-file + (default (plain-file "xremap.yml" "")))) + +(define (xremap-shepherd-service config) + "Return an for xremap with CONFIG" + (match-record config + (package config-file) + (list + (shepherd-service + (provision '(xremap)) + (documentation "xremap daemon") + (requirement '()) + (start #~(make-forkexec-constructor + (list #$(file-append package "/bin/xremap") + #$config-file))) + (stop #~(make-kill-destructor)))))) + +(define xremap-service-type + (service-type + (name 'xremap) + (extensions + (list + (service-extension shepherd-root-service-type + xremap-shepherd-service))) + (default-value (xremap-configuration)) + (description "Run the @code{xremap} utility to modify keymaps system wide."))) + ;;; ;;; The default set of desktop services. base-commit: 9dcd8802f5bc472579f23a38dcf437f8a9ac976c -- 2.41.0