From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: [PATCH] services: 'console-keymap-service' takes multiple files. Date: Sat, 09 Apr 2016 00:32:31 +0300 Message-ID: <87a8l3eqhc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoe17-0003yU-V6 for guix-devel@gnu.org; Fri, 08 Apr 2016 17:32:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoe13-0007Wc-T2 for guix-devel@gnu.org; Fri, 08 Apr 2016 17:32:37 -0400 Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]:34128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoe13-0007WW-L3 for guix-devel@gnu.org; Fri, 08 Apr 2016 17:32:33 -0400 Received: by mail-lf0-x235.google.com with SMTP id j11so92055708lfb.1 for ; Fri, 08 Apr 2016 14:32:33 -0700 (PDT) Received: from leviafan ([217.107.192.146]) by smtp.gmail.com with ESMTPSA id p127sm2371495lfb.27.2016.04.08.14.32.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Apr 2016 14:32:32 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "loadkeys" can take multiple files as arguments, and this may be useful in practice (as discussed with suitsmeveryfine on #guix=C2=B9). So 'console-keymap-service' should be modified accordingly. =C2=B9 https://gnunet.org/bot/log/guix/2016-04-08#T994015 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-services-console-keymap-service-takes-multiple-files.patch >From 8c58974b549479a8e97cf64f21393aa495596e13 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sat, 9 Apr 2016 00:21:15 +0300 Subject: [PATCH] services: 'console-keymap-service' takes multiple files. * gnu/services/base.scm (console-keymap-service-type): Type procedure takes a list of files instead of a single file. (console-keymap-service): Take 'files' as rest arguments. * doc/guix.texi (Base Services): Improve documentation of 'console-keymap-service'. --- doc/guix.texi | 13 +++++++++++-- gnu/services/base.scm | 10 +++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a34d547..ccf37da 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7262,8 +7262,17 @@ Run @var{udev}, which populates the @file{/dev} directory dynamically. @deffn {Scheme Procedure} console-keymap-service @var{file} @cindex keyboard layout -Return a service to load console keymap from @var{file} using -@command{loadkeys} command. +Return a service to load console keymaps from @var{files} using +@command{loadkeys} command. Most likely, you want to load some default +keymap, which can be done like this: + +@example +(console-keymap-service "dvorak") +@end example + +But also you can specify a full file name (or file names) of your +keymap(s). See @code{man loadkeys} for details. + @end deffn @deffn {Scheme Procedure} gpm-service-type [#:gpm @var{gpm}] @ diff --git a/gnu/services/base.scm b/gnu/services/base.scm index b168543..a3585cc 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -494,18 +494,18 @@ strings or string-valued gexps." (define console-keymap-service-type (shepherd-service-type 'console-keymap - (lambda (file) + (lambda (files) (shepherd-service (documentation (string-append "Load console keymap (loadkeys).")) (provision '(console-keymap)) (start #~(lambda _ (zero? (system* (string-append #$kbd "/bin/loadkeys") - #$file)))) + #$@files)))) (respawn? #f))))) -(define (console-keymap-service file) - "Return a service to load console keymap from @var{file}." - (service console-keymap-service-type file)) +(define (console-keymap-service . files) + "Return a service to load console keymaps from @var{files}." + (service console-keymap-service-type files)) (define console-font-service-type (shepherd-service-type -- 2.7.3 --=-=-=--