[PATCH] doc: guix.texi: Add console-font-service-type to Base Services.

  • Done
  • quality assurance status badge
Details
2 participants
  • John Soo
  • Ludovic Courtès
Owner
unassigned
Submitted by
John Soo
Severity
normal
J
J
John Soo wrote on 18 Mar 2020 16:45
(address . guix-patches@gnu.org)
CAKf5CqX7vff8nRYi-KnmTLBBAZU2pMo-zi94m=mBU1aNrRXjrw@mail.gmail.com
Hi guix,

I struggled with the console-font-service-type for a long time (mostly
becase setfont does not state you can specify a path). Documenting it
in the info pages would have helped.

Thanks!

John
From 6a7204a6396781c1bbc1db1defee362c0a8142f9 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Wed, 18 Mar 2020 08:33:59 -0700
Subject: [PATCH] doc: guix.texi: Add console-font-service-type to Base
Services.

* doc/guix.texi (console-font-service-type): Add it.
---
doc/guix.texi | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 28808b0cd5..0626beffac 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12287,6 +12287,23 @@ symlink:
Return a service that sets the host name to @var{name}.
@end deffn
+@deffn {Scheme Procedure} console-font-service-type @var{tty-font-pairs}
+Install the given fonts on the specified ttys (fonts are per
+virtual console on the kernel Linux). The value of this service is a list of
+tty/font pairs. The font can be the name of a font provided by the @code{kbd}
+package or any valid argument to @command{setfont}, as in this example:
+
+@lisp
+'((\"tty1\" . \"LatGrkCyr-8x16\")
+ (\"tty2\" . (file-append
+ font-tamzen
+ \"/share/kbd/consolefonts/TamzenForPowerline10x20.psf\"))
+ (\"tty3\" . (file-append
+ font-terminus
+ \"/share/consolefonts/ter-132n\"))) ; for HDPI
+@end lisp
+@end deffn
+
@deffn {Scheme Procedure} login-service @var{config}
Return a service to run login according to @var{config}, a
@code{<login-configuration>} object, which specifies the message of the day,
--
2.25.1
L
L
Ludovic Courtès wrote on 21 Mar 2020 23:42
(name . John Soo)(address . jsoo1@asu.edu)(address . 40120@debbugs.gnu.org)
87blopwcr5.fsf@gnu.org
Hi John,

Thanks for improving the manual! Some comments:

John Soo <jsoo1@asu.edu> skribis:

Toggle quote (7 lines)
> From 6a7204a6396781c1bbc1db1defee362c0a8142f9 Mon Sep 17 00:00:00 2001
> From: John Soo <jsoo1@asu.edu>
> Date: Wed, 18 Mar 2020 08:33:59 -0700
> Subject: [PATCH] doc: guix.texi: Add console-font-service-type to Base
> Services.
>
> * doc/guix.texi (console-font-service-type): Add it.
^
This should be the name of the section this is added in.

Toggle quote (2 lines)
> +@deffn {Scheme Procedure} console-font-service-type @var{tty-font-pairs}

This should be @defvr because it’s a variable, not a procedure (and thus
has no arguments).

Could you change that accordingly? You can take inspiration from other
service types.

TIA!

Ludo’.
J
J
John Soo wrote on 22 Mar 2020 00:16
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 40120@debbugs.gnu.org)
87o8spmh7w.fsf@asu.edu
Hi Ludo,

Toggle quote (9 lines)
>> * doc/guix.texi (console-font-service-type): Add it.
> ^
> This should be the name of the section this is added in.

>> +@deffn {Scheme Procedure} console-font-service-type @var{tty-font-pairs}
>
> This should be @defvr because it’s a variable, not a procedure (and thus
> has no arguments).

Done and done, thanks again!

John
From 74e8c62c584ac33909036992dde7d4cf3a1c7588 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Wed, 18 Mar 2020 08:33:59 -0700
Subject: [PATCH] doc: guix.texi: Add console-font-service-type to Base
Services.

* doc/guix.texi (Base Services): Add console-font-service-type.
---
doc/guix.texi | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index c2eff582f8..8c694a9e73 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12287,6 +12287,23 @@ symlink:
Return a service that sets the host name to @var{name}.
@end deffn
+@defvr {Scheme Procedure} console-font-service-type @var{tty-font-pairs}
+Install the given fonts on the specified ttys (fonts are per
+virtual console on the kernel Linux). The value of this service is a list of
+tty/font pairs. The font can be the name of a font provided by the @code{kbd}
+package or any valid argument to @command{setfont}, as in this example:
+
+@lisp
+'((\"tty1\" . \"LatGrkCyr-8x16\")
+ (\"tty2\" . (file-append
+ font-tamzen
+ \"/share/kbd/consolefonts/TamzenForPowerline10x20.psf\"))
+ (\"tty3\" . (file-append
+ font-terminus
+ \"/share/consolefonts/ter-132n\"))) ; for HDPI
+@end lisp
+@end deffn
+
@deffn {Scheme Procedure} login-service @var{config}
Return a service to run login according to @var{config}, a
@code{<login-configuration>} object, which specifies the message of the day,
--
2.25.2
J
J
John Soo wrote on 22 Mar 2020 03:40
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 40120@debbugs.gnu.org)
87a749kt7j.fsf@asu.edu
Hi again,

I just realized I should also change "Scheme Procudure" to "Scheme
Variable".

Thanks again,

John
From 8d9bab98fb448e72431bf0e6b24747379082a774 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Wed, 18 Mar 2020 08:33:59 -0700
Subject: [PATCH] doc: guix.texi: Add console-font-service-type to Base
Services.

* doc/guix.texi (Base Services): Add console-font-service-type.
---
doc/guix.texi | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index c2eff582f8..fab41cfe00 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12287,6 +12287,23 @@ symlink:
Return a service that sets the host name to @var{name}.
@end deffn
+@defvr {Scheme Variable} console-font-service-type @var{tty-font-pairs}
+Install the given fonts on the specified ttys (fonts are per
+virtual console on the kernel Linux). The value of this service is a list of
+tty/font pairs. The font can be the name of a font provided by the @code{kbd}
+package or any valid argument to @command{setfont}, as in this example:
+
+@lisp
+'((\"tty1\" . \"LatGrkCyr-8x16\")
+ (\"tty2\" . (file-append
+ font-tamzen
+ \"/share/kbd/consolefonts/TamzenForPowerline10x20.psf\"))
+ (\"tty3\" . (file-append
+ font-terminus
+ \"/share/consolefonts/ter-132n\"))) ; for HDPI
+@end lisp
+@end deffn
+
@deffn {Scheme Procedure} login-service @var{config}
Return a service to run login according to @var{config}, a
@code{<login-configuration>} object, which specifies the message of the day,
--
2.25.2
J
J
John Soo wrote on 22 Mar 2020 04:12
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 40120@debbugs.gnu.org)
875zexkrqc.fsf@asu.edu
Hi again,

Dang it I forgot to change the @end to @end defvr.

This fixes it.

- John
From cb4cf2b72766d4416fe5d2dc69a03914ec3c06c4 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Wed, 18 Mar 2020 08:33:59 -0700
Subject: [PATCH] doc: guix.texi: Add console-font-service-type to Base
Services.

* doc/guix.texi (Base Services): Add console-font-service-type.
---
doc/guix.texi | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 92125abccc..2c54dc3493 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12282,6 +12282,23 @@ symlink:
Return a service that sets the host name to @var{name}.
@end deffn
+@defvr {Scheme Variable} console-font-service-type @var{tty-font-pairs}
+Install the given fonts on the specified ttys (fonts are per
+virtual console on the kernel Linux). The value of this service is a list of
+tty/font pairs. The font can be the name of a font provided by the @code{kbd}
+package or any valid argument to @command{setfont}, as in this example:
+
+@lisp
+'((\"tty1\" . \"LatGrkCyr-8x16\")
+ (\"tty2\" . (file-append
+ font-tamzen
+ \"/share/kbd/consolefonts/TamzenForPowerline10x20.psf\"))
+ (\"tty3\" . (file-append
+ font-terminus
+ \"/share/consolefonts/ter-132n\"))) ; for HDPI
+@end lisp
+@end defvr
+
@deffn {Scheme Procedure} login-service @var{config}
Return a service to run login according to @var{config}, a
@code{<login-configuration>} object, which specifies the message of the day,
--
2.25.2
L
L
Ludovic Courtès wrote on 22 Mar 2020 21:59
(name . John Soo)(address . jsoo1@asu.edu)(address . 40120-done@debbugs.gnu.org)
87h7ygt8ad.fsf@gnu.org
Hi,

John Soo <jsoo1@asu.edu> skribis:

Toggle quote (8 lines)
> From cb4cf2b72766d4416fe5d2dc69a03914ec3c06c4 Mon Sep 17 00:00:00 2001
> From: John Soo <jsoo1@asu.edu>
> Date: Wed, 18 Mar 2020 08:33:59 -0700
> Subject: [PATCH] doc: guix.texi: Add console-font-service-type to Base
> Services.
>
> * doc/guix.texi (Base Services): Add console-font-service-type.

Applied with this changes:

Toggle quote (2 lines)
> +@defvr {Scheme Variable} console-font-service-type @var{tty-font-pairs}

Remove @var{tty-font-pairs}.

Toggle quote (6 lines)
> +@lisp
> +'((\"tty1\" . \"LatGrkCyr-8x16\")
> + (\"tty2\" . (file-append
> + font-tamzen
> + \"/share/kbd/consolefonts/TamzenForPowerline10x20.psf\"))

Changed to quasiquote/unquote as needed (same in gnu/services/base.scm,
which had the same typo), and \" → ".

Thanks,
Ludo’.
Closed
?