[PATCH] services: kmscon: Add xkb-layout and xkb-options fields.

  • Done
  • quality assurance status badge
Details
3 participants
  • luhui
  • Maxime Devos
  • Mathieu Othacehe
Owner
unassigned
Submitted by
luhui
Severity
normal
L
(address . guix-patches@gnu.org)
YIOulQzN9Rs12Kk7@thinkpad-x230-luhui
Added xkb-layout and xkb-options fields to adjust the keyboard layout of kmscon
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(-)

Toggle diff (56 lines)
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
M
M
Maxime Devos wrote on 25 Apr 2021 11:12
328fbd240891f63e52020fa59341c8fbf1f3bb42.camel@telenet.be
luhui schreef op za 24-04-2021 om 13:37 [+0800]:

Toggle quote (3 lines)
> @item @code{xkb-layout} (default: @code{#f})
> Keyboard layout used in Kmscon.

What is the default here, is this a package object, a file-like object,
a string, where can I find a list of keyboard layouts ... please document!

Toggle quote (3 lines)
> @item @code{xkb-options} (default: @code{#f})
> Keyboard layout options used in Kmscon.

What are the possible options, is this a list, a string, a list of strings, ...
please document!

Toggle quote (2 lines)
> Signed-off-by: luhui <luhuins@163.com>

Guix uses Signed-off-by differently from LKML. IIUC, Signed-off-by is used when committing
on behalf of someone else, and is added by the committer. The line would be something like

Signed-off-by: Some Guix Committer <mail@example.org>

As you added a few things to doc/guix.texi and gnu/services/base.scm, you
can add a copyright line there.

Otherwise, I don't see any obvious problems, but I haven't tested.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYIUyahccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qaVAP9upcPILIittDRJhtFZoQ2uZakq
sl0NYR+OBwNBxrlt0QD9FrRQhlJCB9JbSF7MoB0OynOZ+JejSux9iBTWijkzNA8=
=y+nM
-----END PGP SIGNATURE-----


L
(name . Maxime Devos)(address . maximedevos@telenet.be)
YIU+rmMowFm3Gqrw@thinkpad-x230-luhui
ok, new patch:
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(-)

Toggle diff (74 lines)
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
M
M
Maxime Devos wrote on 25 Apr 2021 14:46
(name . luhui)(address . luhuins@163.com)(address . 47994@debbugs.gnu.org)
ef083366e5e92fba2d42a09c3e035f337a38a97e.camel@telenet.be
luhui schreef op zo 25-04-2021 om 18:04 [+0800]:
Toggle quote (8 lines)
> +@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.

I looked in the guix manual for ideas how to formulate this clearer.
seems interesting, in particualr the "keyboard-layout" procedure from (gnu system keyboard).
It seemed a nicer abstraction than just raw strings.

An extract from the manual:

Keyboard layouts are represented by records created by the
‘keyboard-layout’ procedure of ‘(gnu system keyboard)’. Following the X
Keyboard extension (XKB), each layout has four attributes: a name (often
a language code such as “fi” for Finnish or “jp” for Japanese), an
optional variant name, an optional keyboard model name, and a possibly
empty list of additional options. In most cases the layout name is all
you care about.

-- Scheme Procedure: keyboard-layout NAME [VARIANT] [#:model]
[#:options '()]
Return a new keyboard layout with the given NAME and VARIANT.

NAME must be a string such as ‘"fr"’; VARIANT must be a string such
as ‘"bepo"’ or ‘"nodeadkeys"’. See the ‘xkeyboard-config’ package
for valid options.

Here are a few examples:

;; The German QWERTZ layout. Here we assume a standard
;; "pc105" keyboard model.
(keyboard-layout "de")

;; The bépo variant of the French layout.
(keyboard-layout "fr" "bepo")

Could this be used instead of raw strings?


Toggle quote (2 lines)
> +When true, this field be a string used for set keyboard layout used in Kmscon.

When true, this field is a string representing the name of the keyboard layout.
Suggested documentation (based on the xorg-configuration documentation):

@item @code{keboard-layout} (default: @code{#f})
If this is false, Kmscon uses the default keyboard layout.

Otherwise this must be a field is a ‘keyboard layout’ object specifying
the keyboard layout to use for the console. *Note
Keyboard Layout::, for more information on how to specify the
keyboard layout.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYIVkoRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iSDAPsHnU+NSstDxbkqiFgwrGWd6DkL
edu5BnQvxENMnW5jZQEA1UlFcBVfRLkWJLRJaizHcXiDFkH5S1QgzL41Nh/6ng4=
=arVX
-----END PGP SIGNATURE-----


L
(name . Maxime Devos)(address . maximedevos@telenet.be)
YIYgR5cxD9NQWq46@thinkpad-x230-luhui
OK,Re-written the code according to your suggestion.

new patch:
From 49450d3f87bebb0eeb5a2d4a161151b33d413c15 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 keyboard-layout fields.

* gnu/services/base.scm (<kmscon-configuration>): Add keyboard-layout fields.
* doc/guix.texi (Base Services): Document it.
---
doc/guix.texi | 9 +++++++++
gnu/services/base.scm | 21 +++++++++++++++++++--
2 files changed, 28 insertions(+), 2 deletions(-)

Toggle diff (89 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index b9019d5550..74e9ceaf5e 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{keyboard-layout} (default: @code{#f})
+If this is @code{#f}, Kmscon uses the default keyboard layout---usually US
+English (``qwerty'') for a 105-key PC keyboard.
+
+Otherwise this must be a @code{keyboard-layout} object specifying the keyboard
+layout. @xref{Keyboard Layout}, for more information on how to specify the
+keyboard layout.
+
@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..0878746fa8 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.
;;;
@@ -41,6 +42,7 @@
#:use-module (gnu system shadow) ; 'user-account', etc.
#:use-module (gnu system uuid)
#:use-module (gnu system file-systems) ; 'file-system', etc.
+ #:use-module (gnu system keyboard)
#:use-module (gnu system mapped-devices)
#:use-module ((gnu system linux-initrd)
#:select (file-system-packages))
@@ -2313,7 +2315,9 @@ 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))
+ (keyboard-layout kmscon-configuration-keyboard-layout
+ (default #f))) ; #f | <keyboard-layout>
(define kmscon-service-type
(shepherd-service-type
@@ -2326,7 +2330,8 @@ 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))
+ (keyboard-layout (kmscon-configuration-keyboard-layout config)))
(define kmscon-command
#~(list
@@ -2335,6 +2340,18 @@ 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 keyboard-layout
+ (let* ((layout (keyboard-layout-name keyboard-layout))
+ (variant (keyboard-layout-variant keyboard-layout))
+ (model (keyboard-layout-model keyboard-layout))
+ (options (keyboard-layout-options keyboard-layout)))
+ `("--xkb-layout" ,layout
+ ,@(if variant `("--xkb-layout" ,variant) '())
+ ,@(if model `("--xkb-model" ,model) '())
+ ,@(if (null? options)
+ '()
+ `("--xkb-options" ,(string-join options ",")))))
+ '())
#$@(if hardware-acceleration? '("--hwaccel") '())
"--login" "--"
#$login-program #$@login-arguments
--
2.31.1
M
M
Maxime Devos wrote on 26 Apr 2021 21:23
(name . luhui)(address . luhuins@163.com)(address . 47994@debbugs.gnu.org)
e11c877f6c82305d3b69305e6e19f8753ac6517a.camel@telenet.be
luhui schreef op ma 26-04-2021 om 10:07 [+0800]:
Toggle quote (4 lines)
> OK,Re-written the code according to your suggestion.
>
> new patch:

The new patch looks good to me, but I haven't tested it.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYIcTFxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sQgAP9+IICygjMRTwDn+Iw9v8EZBa5H
7DP9DFNd3N2DOessIAEAk2BoqVN7HxqP6jgiNFOPFjdl1EM4VeSZ51HyQ/9TPQI=
=VK3J
-----END PGP SIGNATURE-----


L
L
luhui wrote on 4 May 2021 13:32
(name . Maxime Devos)(address . maximedevos@telenet.be)
YJEw4bi7dPvBbyec@thinkpad-x230-luhui
On Mon, Apr 26, 2021 at 09:23:00PM +0200, Maxime Devos wrote:
Toggle quote (8 lines)
> luhui schreef op ma 26-04-2021 om 10:07 [+0800]:
> > OK,Re-written the code according to your suggestion.
> >
> > new patch:
>
> The new patch looks good to me, but I haven't tested it.


write it in a vm configuration

test code:

#+BEGIN_SRC scheme

;; need delete getty service (tty3,tty4,tty5,tty6)

(dbus-service)
(syslog-service)
;; default
(service kmscon-service-type
(kmscon-configuration
(virtual-terminal "tty3")))
;; us
(service kmscon-service-type
(kmscon-configuration
(virtual-terminal "tty4")
(keyboard-layout (keyboard-layout "us"))))
;; us with ctrl:nocaps options
(service kmscon-service-type
(kmscon-configuration
(virtual-terminal "tty5")
(keyboard-layout
(keyboard-layout "us" #:options '("ctrl:nocaps")))))
;; with all args
(service kmscon-service-type
(kmscon-configuration
(virtual-terminal "tty6")
(keyboard-layout
(keyboard-layout "us" "intl" #:model "macbook78" #:options
'("ctrl:nocaps" "compose:menu")))))

#+END_SRC

then

guix system vm vm-configuration.scm

xxxxxxxxxx-vm.sh # need graphic

in vm:

herd status # ensure services is running

# test
Ctrl + Alt + F3 # ensure it is us keyboard layout
Ctrl + Alt + F4 # ensure it is us keyboard layout
Ctrl + Alt + F5 # ensure Caps Locks is Ctrl
...
M
M
Mathieu Othacehe wrote on 4 Jun 2021 14:40
Re: bug#47994: [PATCH] services: kmscon: Add xkb-layout and xkb-options fields.
(name . luhui)(address . luhuins@163.com)
87bl8lerbe.fsf_-_@gnu.org
Hello,

Toggle quote (2 lines)
> + ,@(if variant `("--xkb-layout" ,variant) '())

This is supposed to be "--xkb-variant" here, right?

Otherwise, it looks good to me.

Thanks,

Mathieu
L
(name . Mathieu Othacehe)(address . othacehe@gnu.org)
YNCwInojQDzA+IOG@thinkpad-x230-luhui
On Fri, Jun 04, 2021 at 02:40:21PM +0200, Mathieu Othacehe wrote:
Toggle quote (7 lines)
>
> Hello,
>
> > + ,@(if variant `("--xkb-layout" ,variant) '())
>
> This is supposed to be "--xkb-variant" here, right?

Sorry, made this mistake, now I fixed it and sent a new patch.

Toggle quote (6 lines)
>
> Otherwise, it looks good to me.
>
> Thanks,
>
> Mathieu
From 310ff049da9e6ea7f0556430b0b51580a675d696 Mon Sep 17 00:00:00 2001
From: luhui <luhuins@163.com>
Date: Mon, 21 Jun 2021 22:58:06 +0800
Subject: [PATCH] services: kmscon: Add keyboard-layout fields.

* gnu/services/base.scm (<kmscon-configuration>): Add keyboard-layout fields.
* doc/guix.texi (Base Services): Document it.
---
doc/guix.texi | 9 +++++++++
gnu/services/base.scm | 21 +++++++++++++++++++--
2 files changed, 28 insertions(+), 2 deletions(-)

Toggle diff (89 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 66c6adc4f5..eb151a56fb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -91,6 +91,7 @@ Copyright @copyright{} 2020 Edgar Vincent@*
Copyright @copyright{} 2021 Maxime Devos@*
Copyright @copyright{} 2021 B. Wilson@*
Copyright @copyright{} 2021 Xinglu Chen@*
+Copyright @copyright{} 2021 Hui Lu@*
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -15280,6 +15281,14 @@ Font engine used in Kmscon.
@item @code{font-size} (default: @code{12})
Font size used in Kmscon.
+@item @code{keyboard-layout} (default: @code{#f})
+If this is @code{#f}, Kmscon uses the default keyboard layout---usually US
+English (``qwerty'') for a 105-key PC keyboard.
+
+Otherwise this must be a @code{keyboard-layout} object specifying the keyboard
+layout. @xref{Keyboard Layout}, for more information on how to specify the
+keyboard layout.
+
@item @code{kmscon} (default: @var{kmscon})
The Kmscon package to use.
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 3be2e984c3..6922d7f90b 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 Hui Lu <luhuins@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -41,6 +42,7 @@
#:use-module (gnu system shadow) ; 'user-account', etc.
#:use-module (gnu system uuid)
#:use-module (gnu system file-systems) ; 'file-system', etc.
+ #:use-module (gnu system keyboard)
#:use-module (gnu system mapped-devices)
#:use-module ((gnu system linux-initrd)
#:select (file-system-packages))
@@ -2267,7 +2269,9 @@ notably to select, copy, and paste text. The default options use the
(font-engine kmscon-configuration-font-engine
(default "pango"))
(font-size kmscon-configuration-font-size
- (default 12)))
+ (default 12))
+ (keyboard-layout kmscon-configuration-keyboard-layout
+ (default #f))) ; #f | <keyboard-layout>
(define kmscon-service-type
(shepherd-service-type
@@ -2280,7 +2284,8 @@ notably to select, copy, and paste text. The default options use the
(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))
+ (keyboard-layout (kmscon-configuration-keyboard-layout config)))
(define kmscon-command
#~(list
@@ -2289,6 +2294,18 @@ notably to select, copy, and paste text. The default options use the
"--no-switchvt" ;Prevent a switch to the virtual terminal.
"--font-engine" #$font-engine
"--font-size" #$(number->string font-size)
+ #$@(if keyboard-layout
+ (let* ((layout (keyboard-layout-name keyboard-layout))
+ (variant (keyboard-layout-variant keyboard-layout))
+ (model (keyboard-layout-model keyboard-layout))
+ (options (keyboard-layout-options keyboard-layout)))
+ `("--xkb-layout" ,layout
+ ,@(if variant `("--xkb-variant" ,variant) '())
+ ,@(if model `("--xkb-model" ,model) '())
+ ,@(if (null? options)
+ '()
+ `("--xkb-options" ,(string-join options ",")))))
+ '())
#$@(if hardware-acceleration? '("--hwaccel") '())
"--login" "--"
#$login-program #$@login-arguments
--
2.32.0
M
M
Mathieu Othacehe wrote on 29 Jun 2021 19:02
(name . luhui)(address . luhuins@163.com)
87lf6s8uzy.fsf@gnu.org
Hey,

Toggle quote (2 lines)
> Sorry, made this mistake, now I fixed it and sent a new patch.

Pushed with minor edits,

Thanks,

Mathieu
Closed
?