From: luhui <luhuins@163.com>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 47994@debbugs.gnu.org, luhui <luhuins@163.com>
Subject: [bug#47994] [PATCH] services: kmscon: Add xkb-layout and xkb-options fields.
Date: Sun, 25 Apr 2021 18:04:30 +0800 [thread overview]
Message-ID: <YIU+rmMowFm3Gqrw@thinkpad-x230-luhui> (raw)
In-Reply-To: <328fbd240891f63e52020fa59341c8fbf1f3bb42.camel@telenet.be>
[-- Attachment #1: Type: text/plain, Size: 15 bytes --]
ok, new patch:
[-- Attachment #2: 0001-services-kmscon-Add-xkb-layout-and-xkb-options-field.patch --]
[-- Type: text/plain, Size: 3772 bytes --]
From 17c626839fb397e8c6f40d2855623f7181d0ab31 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.
---
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 <pelzflorian@pelzflorian.de>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 qblade <qblade@protonmail.com>
+;;; Copyright © 2021 luhui <luhuins@163.com>
;;;
;;; 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
next prev parent reply other threads:[~2021-04-25 14:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YIU+rmMowFm3Gqrw@thinkpad-x230-luhui \
--to=luhuins@163.com \
--cc=47994@debbugs.gnu.org \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.