services: gpm: Provide a default value and document 'gpm-service-type'.
* gnu/services/base.scm (%default-gpm-options): New variable. (<gpm-configuration>)[gpm, options]: Add default values. (gpm-service-type)[default-value]: New field. (gpm-service): Use %DEFAULT-GPM-OPTIONS and mark as deprecated. * doc/guix.texi (Base Services): Document 'gpm-service-type' and 'gpm-configuration'. Remove 'gpm-service'.
This commit is contained in:
parent
6ac8b7359a
commit
5986e94118
|
@ -10383,15 +10383,31 @@ See @code{man loadkeys} for details.
|
||||||
|
|
||||||
@cindex mouse
|
@cindex mouse
|
||||||
@cindex gpm
|
@cindex gpm
|
||||||
@deffn {Scheme Procedure} gpm-service [#:gpm @var{gpm}] @
|
@defvr {Scheme Variable} gpm-service-type
|
||||||
[#:options]
|
This is the type of the service that runs GPM, the @dfn{general-purpose
|
||||||
Run @var{gpm}, the general-purpose mouse daemon, with the given
|
mouse daemon}, which provides mouse support to the Linux console. GPM
|
||||||
command-line @var{options}. GPM allows users to use the mouse in the console,
|
allows users to use the mouse in the console, notably to select, copy,
|
||||||
notably to select, copy, and paste text. The default value of @var{options}
|
and paste text.
|
||||||
uses the @code{ps2} protocol, which works for both USB and PS/2 mice.
|
|
||||||
|
|
||||||
This service is not part of @var{%base-services}.
|
The value for services of this type must be a @code{gpm-configuration}
|
||||||
@end deffn
|
(see below). This service is not part of @var{%base-services}.
|
||||||
|
@end defvr
|
||||||
|
|
||||||
|
@deftp {Data Type} gpm-configuration
|
||||||
|
Data type representing the configuration of GPM.
|
||||||
|
|
||||||
|
@table @asis
|
||||||
|
@item @code{options} (default: @code{%default-gpm-options})
|
||||||
|
Command-line options passed to @command{gpm}. The default set of
|
||||||
|
options instruct @command{gpm} to listen to mouse events on
|
||||||
|
@file{/dev/input/mice}. @xref{Command Line,,, gpm, gpm manual}, for
|
||||||
|
more information.
|
||||||
|
|
||||||
|
@item @code{gpm} (default: @code{gpm})
|
||||||
|
The GPM package to use.
|
||||||
|
|
||||||
|
@end table
|
||||||
|
@end deftp
|
||||||
|
|
||||||
@anchor{guix-publish-service-type}
|
@anchor{guix-publish-service-type}
|
||||||
@deffn {Scheme Variable} guix-publish-service-type
|
@deffn {Scheme Variable} guix-publish-service-type
|
||||||
|
|
|
@ -1962,10 +1962,16 @@ extra rules from the packages listed in @var{rules}."
|
||||||
"Return a service that uses @var{device} as a swap device."
|
"Return a service that uses @var{device} as a swap device."
|
||||||
(service swap-service-type device))
|
(service swap-service-type device))
|
||||||
|
|
||||||
|
(define %default-gpm-options
|
||||||
|
;; Default options for GPM.
|
||||||
|
'("-m" "/dev/input/mice" "-t" "ps2"))
|
||||||
|
|
||||||
(define-record-type* <gpm-configuration>
|
(define-record-type* <gpm-configuration>
|
||||||
gpm-configuration make-gpm-configuration gpm-configuration?
|
gpm-configuration make-gpm-configuration gpm-configuration?
|
||||||
(gpm gpm-configuration-gpm) ;package
|
(gpm gpm-configuration-gpm ;package
|
||||||
(options gpm-configuration-options)) ;list of strings
|
(default gpm))
|
||||||
|
(options gpm-configuration-options ;list of strings
|
||||||
|
(default %default-gpm-options)))
|
||||||
|
|
||||||
(define gpm-shepherd-service
|
(define gpm-shepherd-service
|
||||||
(match-lambda
|
(match-lambda
|
||||||
|
@ -2000,14 +2006,15 @@ extra rules from the packages listed in @var{rules}."
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension shepherd-root-service-type
|
(list (service-extension shepherd-root-service-type
|
||||||
gpm-shepherd-service)))
|
gpm-shepherd-service)))
|
||||||
|
(default-value (gpm-configuration))
|
||||||
(description
|
(description
|
||||||
"Run GPM, the general-purpose mouse daemon, with the given
|
"Run GPM, the general-purpose mouse daemon, with the given
|
||||||
command-line options. GPM allows users to use the mouse in the console,
|
command-line options. GPM allows users to use the mouse in the console,
|
||||||
notably to select, copy, and paste text. The default options use the
|
notably to select, copy, and paste text. The default options use the
|
||||||
@code{ps2} protocol, which works for both USB and PS/2 mice.")))
|
@code{ps2} protocol, which works for both USB and PS/2 mice.")))
|
||||||
|
|
||||||
(define* (gpm-service #:key (gpm gpm)
|
(define* (gpm-service #:key (gpm gpm) ;deprecated
|
||||||
(options '("-m" "/dev/input/mice" "-t" "ps2")))
|
(options %default-gpm-options))
|
||||||
"Run @var{gpm}, the general-purpose mouse daemon, with the given
|
"Run @var{gpm}, the general-purpose mouse daemon, with the given
|
||||||
command-line @var{options}. GPM allows users to use the mouse in the console,
|
command-line @var{options}. GPM allows users to use the mouse in the console,
|
||||||
notably to select, copy, and paste text. The default value of @var{options}
|
notably to select, copy, and paste text. The default value of @var{options}
|
||||||
|
|
Loading…
Reference in New Issue