all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] services: 'console-keymap-service' takes multiple files.
@ 2016-04-08 21:32 Alex Kost
  2016-04-09  8:16 ` Alex Kost
  2016-04-13 21:23 ` Ludovic Courtès
  0 siblings, 2 replies; 12+ messages in thread
From: Alex Kost @ 2016-04-08 21:32 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

"loadkeys" can take multiple files as arguments, and this may be useful
in practice (as discussed with suitsmeveryfine on #guix¹).  So
'console-keymap-service' should be modified accordingly.

¹ https://gnunet.org/bot/log/guix/2016-04-08#T994015


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-console-keymap-service-takes-multiple-files.patch --]
[-- Type: text/x-patch, Size: 2488 bytes --]

From 8c58974b549479a8e97cf64f21393aa495596e13 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-04-17  7:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-08 21:32 [PATCH] services: 'console-keymap-service' takes multiple files Alex Kost
2016-04-09  8:16 ` Alex Kost
2016-04-13 21:23 ` Ludovic Courtès
2016-04-15 16:10   ` Alex Kost
2016-04-15 20:19     ` Albin
2016-04-16  8:24       ` Alex Kost
2016-04-15 21:17     ` Ludovic Courtès
2016-04-16  2:47       ` Albin
2016-04-16  8:24         ` Alex Kost
2016-04-16 14:41           ` Albin
2016-04-16 22:49             ` Ludovic Courtès
2016-04-17  7:41             ` Alex Kost

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.