summaryrefslogtreecommitdiff
path: root/gnu/services/xorg.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-05 17:51:28 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-05 17:55:51 +0200
commit1361584983b7e53f5eadd1815d1a2b81b387e6ad (patch)
treeb0d12ac891a277031a13ffd4a471ae20a070d4ff /gnu/services/xorg.scm
parent3ef3bdf1cd52965457c6664e15d03dc6370925b0 (diff)
downloadpatches-1361584983b7e53f5eadd1815d1a2b81b387e6ad.tar
patches-1361584983b7e53f5eadd1815d1a2b81b387e6ad.tar.gz
services: localed: Do nothing for unconfigured keyboards.
* gnu/services/xorg.scm (localed-service-type)[package]: Return the empty list when the 'keyboard-layout' field is #f. [compose]: Use 'find' instead of 'first'.
Diffstat (limited to 'gnu/services/xorg.scm')
-rw-r--r--gnu/services/xorg.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index d0e6c7cd5c..d4e73c13b4 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -707,7 +707,12 @@ makes the good ol' XlockMore usable."
'()))
(define localed-service-type
- (let ((package (compose list localed-configuration-localed)))
+ (let ((package (lambda (config)
+ ;; Don't bother if the user didn't specify any keyboard
+ ;; layout.
+ (if (localed-configuration-keyboard-layout config)
+ (list (localed-configuration-localed config))
+ '()))))
(service-type (name 'localed)
(extensions
(list (service-extension dbus-root-service-type
@@ -720,7 +725,8 @@ makes the good ol' XlockMore usable."
;; This service can be extended, typically by the X login
;; manager, to communicate the chosen Xorg keyboard layout.
- (compose first)
+ (compose (lambda (extensions)
+ (find keyboard-layout? extensions)))
(extend (lambda (config keyboard-layout)
(localed-configuration
(inherit config)