unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#47994] [PATCH] services: kmscon: Add xkb-layout and xkb-options fields.
@ 2021-04-24  5:37 luhui
  2021-04-25  9:12 ` Maxime Devos
  0 siblings, 1 reply; 10+ messages in thread
From: luhui @ 2021-04-24  5:37 UTC (permalink / raw)
  To: 47994

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

Added xkb-layout and xkb-options fields to adjust the keyboard layout of kmscon


[-- Attachment #2: 0001-services-kmscon-Add-xkb-layout-and-xkb-options-field.patch --]
[-- Type: text/plain, Size: 2903 bytes --]

From 02ae9ab208f83974eac92dcbeb74091b0670cef7 Mon Sep 17 00:00:00 2001
From: luhui <luhuins@163.com>
Date: Sat, 24 Apr 2021 10:56:03 +0800
Subject: [PATCH] services: kmscon: Add xkb-layout and xkb-options fields.

* gnu/services/base.scm (<kmscon-configuration>): Add xkb-layout and
xkb-options fields.
* doc/guix.texi (Base Services): Document them.

Signed-off-by: luhui <luhuins@163.com>
---
 doc/guix.texi         |  6 ++++++
 gnu/services/base.scm | 12 ++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index b9019d5550..e92c57e84c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15254,6 +15254,12 @@ Font engine used in Kmscon.
 @item @code{font-size} (default: @code{12})
 Font size used in Kmscon.
 
+@item @code{xkb-layout} (default: @code{#f})
+Keyboard layout used in Kmscon.
+
+@item @code{xkb-options} (default: @code{#f})
+Keyboard layout options used in Kmscon.
+
 @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..2c442416b7 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -2313,7 +2313,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))
+  (xkb-options             kmscon-configuration-xkb-options
+                           (default #f)))
 
 (define kmscon-service-type
   (shepherd-service-type
@@ -2326,7 +2330,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 +2341,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


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

end of thread, other threads:[~2021-06-29 17:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-24  5:37 [bug#47994] [PATCH] services: kmscon: Add xkb-layout and xkb-options fields luhui
2021-04-25  9:12 ` Maxime Devos
2021-04-25 10:04   ` luhui
2021-04-25 12:46     ` Maxime Devos
2021-04-26  2:07       ` luhui
2021-04-26 19:23         ` Maxime Devos
2021-05-04 11:32           ` luhui
2021-06-04 12:40         ` Mathieu Othacehe
2021-06-21 15:28           ` luhui
2021-06-29 17:02             ` bug#47994: " Mathieu Othacehe

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).