From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uMflIbB2hWB9owAAgWs5BA (envelope-from ) for ; Sun, 25 Apr 2021 16:03:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2Et4HbB2hWBhMAAAbx9fmQ (envelope-from ) for ; Sun, 25 Apr 2021 14:03:28 +0000 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 F180714CB4 for ; Sun, 25 Apr 2021 16:03:27 +0200 (CEST) Received: from localhost ([::1]:47140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lafM6-0002ep-V5 for larch@yhetil.org; Sun, 25 Apr 2021 10:03:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1labdO-00034S-Cn for guix-patches@gnu.org; Sun, 25 Apr 2021 06:05:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1labdO-0008Qf-5X for guix-patches@gnu.org; Sun, 25 Apr 2021 06:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1labdN-0003Yg-Vg for guix-patches@gnu.org; Sun, 25 Apr 2021 06:05:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47994] [PATCH] services: kmscon: Add xkb-layout and xkb-options fields. Resent-From: luhui Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Apr 2021 10:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47994 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 47994@debbugs.gnu.org, luhui Received: via spool by 47994-submit@debbugs.gnu.org id=B47994.161934508113648 (code B ref 47994); Sun, 25 Apr 2021 10:05:01 +0000 Received: (at 47994) by debbugs.gnu.org; 25 Apr 2021 10:04:41 +0000 Received: from localhost ([127.0.0.1]:42033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1labd3-0003Y4-2q for submit@debbugs.gnu.org; Sun, 25 Apr 2021 06:04:41 -0400 Received: from m12-18.163.com ([220.181.12.18]:34769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1labcy-0003Xr-Ua for 47994@debbugs.gnu.org; Sun, 25 Apr 2021 06:04:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version; bh=/y6bH REwU+4DUgw2HHFEtARI7wL7mZ85/wd3Tuz9+hI=; b=OEGgr2dQi3j9s8eOCCY+p bYMlmuXGQ8f9CLruuyOuo+130LQsB3gbFMwldK3DlXl4r5vXeJNiQZRajyJje+Tc ePr3khriYNtkAYcf62jbrGWoOP0/9bhT52k98Pb8dPc+pR+LvgtTCv/FnDckFhL6 QdthnLqiivcoaD/9xy45w4= Received: from localhost (unknown [110.178.47.120]) by smtp14 (Coremail) with SMTP id EsCowADHk9WuPoVgPoBBfw--.17163S3; Sun, 25 Apr 2021 18:04:31 +0800 (CST) Date: Sun, 25 Apr 2021 18:04:30 +0800 From: luhui Message-ID: References: <328fbd240891f63e52020fa59341c8fbf1f3bb42.camel@telenet.be> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="FYK+08Q2PiYqzPtP" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <328fbd240891f63e52020fa59341c8fbf1f3bb42.camel@telenet.be> X-CM-TRANSID: EsCowADHk9WuPoVgPoBBfw--.17163S3 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU0hL0UUUUU X-Originating-IP: [110.178.47.120] X-CM-SenderInfo: 5oxk3xlqv6il2tof0z/1tbiMg9-DFWBtxn4ggAAsO X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 25 Apr 2021 10:03:03 -0400 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619359408; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=/y6bHREwU+4DUgw2HHFEtARI7wL7mZ85/wd3Tuz9+hI=; b=oNPvT+nd+xTCnZGHZLZEHa9EaV2GGqZGLfgXsSublea20koS4VjuRjLSmv01k0UKVk3GjC x4tXMOv5aHx+xgjByMIiLpA6VjhyUyR3BIFPcX1mq5i4oT1gOcBWDG29b0MfSxmlIbKQpA RTzm9AcpqeB+n1rbWuBSE4pbtl+tudBtV5ARp7pzBdK5vx7Fqyj5DwuvWmhYAssQzz6Nbc 40tq8xU3ek8t3Jd/SjvCSPGGSzDycepPJHiaNVuEpvqYXJJ9eqUHOwLW54ye7IyCNjqkz7 VL75TEWsuh144EhgPc74GE6qf4hfvmaUM+aiaxbrgrGEPi9NF74lw7pNyA8xNw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619359408; a=rsa-sha256; cv=none; b=D9hb6HW7j1KedD8i7Eb8csmrtNxGbdiRAGw+JxM6LI2nd8Gg8F+bp9mH4tjwWIIuemCP/8 SojkzxmLddzsBftcRyPxGAoWPagEFQqLVZB6EHhVJ7DFHbxwUL8ZI39tWPx+dZjPawS4rq YKYpdmGlDWQdpbvoi+ah7MFOcG3FuyhIxMoEtAg3oOeS8SVcVA2nkBEvnlzv4zyYVHhW2u EewUBFr6xj2LS7FDW40ES1YRk0e1ghcidpzDPCWmSvMuLom2rlq+MagNYV2zipyBgH7ENg xQ/0fEOh1hQUcJn7gYk3V7VrZKJx/njTAGtE7lU2YfaPJksLE8dswhjbYUE8WA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=OEGgr2dQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.16 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=OEGgr2dQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: F180714CB4 X-Spam-Score: 0.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: NOwhyLkEghMe --FYK+08Q2PiYqzPtP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ok, new patch: --FYK+08Q2PiYqzPtP Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-services-kmscon-Add-xkb-layout-and-xkb-options-field.patch" Content-Transfer-Encoding: 8bit >From 17c626839fb397e8c6f40d2855623f7181d0ab31 Mon Sep 17 00:00:00 2001 From: luhui Date: Sat, 24 Apr 2021 10:56:03 +0800 Subject: [PATCH] services: kmscon: Add xkb-layout and xkb-options fields. * gnu/services/base.scm (): Add xkb-layout and xkb-options fields. * doc/guix.texi (Base Services): Document them. --- doc/guix.texi | 9 +++++++++ gnu/services/base.scm | 13 +++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index b9019d5550..e8007c3965 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -88,6 +88,7 @@ Copyright @copyright{} 2020 John Soo@* Copyright @copyright{} 2020 Jonathan Brielmaier@* Copyright @copyright{} 2020 Edgar Vincent@* Copyright @copyright{} 2021 Maxime Devos@* +Copyright @copyright{} 2021 lu hui@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -15254,6 +15255,14 @@ Font engine used in Kmscon. @item @code{font-size} (default: @code{12}) Font size used in Kmscon. +@item @code{xkb-layout} (default: @code{#f}) +When true, this field be a string used for set keyboard layout used in Kmscon. +See the @code{xkeyboard-config} package for valid layouts. + +@item @code{xkb-options} (default: @code{#f}) +When true, this field be a string used for set keyboard layout options used in +Kmscon. See the @code{xkeyboard-config} package for valid options. + @item @code{kmscon} (default: @var{kmscon}) The Kmscon package to use. diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 24b3ea785b..bee101ab29 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2020 Florian Pelz ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2021 qblade +;;; Copyright © 2021 luhui ;;; ;;; This file is part of GNU Guix. ;;; @@ -2313,7 +2314,11 @@ This service is not part of @var{%base-services}." (font-engine kmscon-configuration-font-engine (default "pango")) (font-size kmscon-configuration-font-size - (default 12))) + (default 12)) + (xkb-layout kmscon-configuration-xkb-layout + (default #f)) ;string | #f + (xkb-options kmscon-configuration-xkb-options + (default #f))) ;string | #f (define kmscon-service-type (shepherd-service-type @@ -2326,7 +2331,9 @@ This service is not part of @var{%base-services}." (auto-login (kmscon-configuration-auto-login config)) (hardware-acceleration? (kmscon-configuration-hardware-acceleration? config)) (font-engine (kmscon-configuration-font-engine config)) - (font-size (kmscon-configuration-font-size config))) + (font-size (kmscon-configuration-font-size config)) + (xkb-layout (kmscon-configuration-xkb-layout config)) + (xkb-options (kmscon-configuration-xkb-options config))) (define kmscon-command #~(list @@ -2335,6 +2342,8 @@ This service is not part of @var{%base-services}." "--no-switchvt" ;Prevent a switch to the virtual terminal. "--font-engine" #$font-engine "--font-size" #$(number->string font-size) + #$@(if xkb-layout (list "--xkb-layout" xkb-layout) '()) + #$@(if xkb-options (list "--xkb-options" xkb-options) '()) #$@(if hardware-acceleration? '("--hwaccel") '()) "--login" "--" #$login-program #$@login-arguments -- 2.31.1 --FYK+08Q2PiYqzPtP--