unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#31735] [PATCH] Document xorg keymap configuration
@ 2018-06-06 17:05 Julien Lepiller
  2018-06-08 16:42 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Lepiller @ 2018-06-06 17:05 UTC (permalink / raw)
  To: 31735

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

Hi, this patch adds an example configuration for using a different
keyboard layout in xorg.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-Document-xorg-keymap-configuration.patch --]
[-- Type: text/x-patch, Size: 2317 bytes --]

From 2bb6a98052313dc40d62184dd62a0a625e2b17c1 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Wed, 6 Jun 2018 19:01:42 +0200
Subject: [PATCH] doc: Document xorg keymap configuration.

* doc/guix.texi (Xorg display): Add an example xorg keymap configuration.
---
 doc/guix.texi | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index e1353842e..cb81d8f01 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11851,6 +11851,44 @@ resolutions---e.g., @code{((1024 768) (640 480))}.
 Last, @var{extra-config} is a list of strings or objects appended to the
 configuration file.  It is used to pass extra text to be
 added verbatim to the configuration file.
+
+@cindex keymap
+@cindex keyboard layout
+This procedure is especially useful to configure a different keyboard layout
+than the default US keymap.  For instance, to use the ``bépo'' keymap by
+default on the display manager:
+
+@example
+(define bepo-evdev
+  "Section \"InputClass\"
+        Identifier \"evdev keyboard catchall\"
+        Driver \"evdev\"
+        MatchIsKeyboard \"on\"
+        Option \"xkb_layout\" \"fr\"
+        Option \"xkb_variant\" \"bepo\"
+EndSection")
+
+(operating-system
+  ...
+  (services
+    (modify-services %desktop-services
+      (slim-service-type config =>
+        (slim-configuration
+          (inherit config)
+          (startx (xorg-start-command
+                   #:configuration-file
+                   (xorg-configuration-file
+                     #:extra-config
+                     (list bepo-evdev)))))))))
+@end example
+
+The @code{MatchIsKeyboard} line specifies that we only apply the configuration
+to keyboards.  Without this line, other devices such as touchpad may not work
+correctly because they will be attached to the wrong driver.  In this example,
+the user typically used @code{setxkbmap fr bepo} to set their favorite keymap
+once logged in.  The first argument corresponds to the layout, while the second
+argument corresponds to the variant.  The @code{xkb_variant} line can be omitted
+to select the default variant.
 @end deffn
 
 @deffn {Scheme Procedure} screen-locker-service @var{package} [@var{program}]
-- 
2.17.0


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

* [bug#31735] [PATCH] Document xorg keymap configuration
  2018-06-06 17:05 [bug#31735] [PATCH] Document xorg keymap configuration Julien Lepiller
@ 2018-06-08 16:42 ` Ludovic Courtès
  2018-06-08 18:40   ` bug#31735: " Julien Lepiller
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2018-06-08 16:42 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 31735

Hello,

Julien Lepiller <julien@lepiller.eu> skribis:

> From 2bb6a98052313dc40d62184dd62a0a625e2b17c1 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Wed, 6 Jun 2018 19:01:42 +0200
> Subject: [PATCH] doc: Document xorg keymap configuration.
>
> * doc/guix.texi (Xorg display): Add an example xorg keymap configuration.

LGTM!  Though…

> +(define bepo-evdev
> +  "Section \"InputClass\"
> +        Identifier \"evdev keyboard catchall\"
> +        Driver \"evdev\"
> +        MatchIsKeyboard \"on\"
> +        Option \"xkb_layout\" \"fr\"
> +        Option \"xkb_variant\" \"bepo\"
> +EndSection")
> +
> +(operating-system
> +  ...
> +  (services
> +    (modify-services %desktop-services
> +      (slim-service-type config =>
> +        (slim-configuration
> +          (inherit config)
> +          (startx (xorg-start-command
> +                   #:configuration-file
> +                   (xorg-configuration-file
> +                     #:extra-config
> +                     (list bepo-evdev)))))))))

… I really hope we can soon improve on this and provide an abstract
mechanism to specify the keyboard layout for everything from GRUB to X.

Thanks,
Ludo’.

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

* bug#31735: [PATCH] Document xorg keymap configuration
  2018-06-08 16:42 ` Ludovic Courtès
@ 2018-06-08 18:40   ` Julien Lepiller
  0 siblings, 0 replies; 3+ messages in thread
From: Julien Lepiller @ 2018-06-08 18:40 UTC (permalink / raw)
  To: 31735-done

Le Fri, 08 Jun 2018 18:42:58 +0200,
ludo@gnu.org (Ludovic Courtès) a écrit :

> 
> … I really hope we can soon improve on this and provide an abstract
> mechanism to specify the keyboard layout for everything from GRUB to
> X.

Same here. Anyway, pushed as 136a1e8b577a5f44e7ff35e24d81d13be922f2af.

> 
> Thanks,
> Ludo’.

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

end of thread, other threads:[~2018-06-08 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-06 17:05 [bug#31735] [PATCH] Document xorg keymap configuration Julien Lepiller
2018-06-08 16:42 ` Ludovic Courtès
2018-06-08 18:40   ` bug#31735: " Julien Lepiller

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).