summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-08-09 23:51:48 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-08-10 00:33:30 -0400
commit59ee837d8b11d7d688045b601e8b240ccbdbe7c7 (patch)
tree8e22a84fbfbc5e04af554a86e6f341174c73f23c /gnu/services
parent4b494878380920c8c7eecccd1f299164dd4a2c3f (diff)
services: elogind: Fix default behavior for lid close.
Fixes <https://issues.guix.gnu.org/57052>, which was a behavior change introduced inadvertently in 4c698cd51209a0102477478b026ea04bd7e45908. * gnu/services/desktop.scm (<elogind-configuration>) [handle-lid-switch-external-power]: Default to *unspecified*, which serializes to nothing. This matches upstream behavior, meaning that even when plugged to a power cord, a laptop will suspend when the lid is closed. * doc/guix.texi (Desktop Services): Update doc. Reported-by: Cairn <cairn@pm.me>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/desktop.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 29a3722f1b5..f891d1b5ccd 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -3,7 +3,7 @@
3;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> 3;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com> 5;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
6;;; Copyright © 2017, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> 6;;; Copyright © 2017, 2020, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
7;;; Copyright © 2017 Nikita <nikita@n0.is> 7;;; Copyright © 2017 Nikita <nikita@n0.is>
8;;; Copyright © 2018, 2020 Efraim Flashner <efraim@flashner.co.il> 8;;; Copyright © 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
9;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> 9;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
@@ -971,7 +971,7 @@ include the @command{udisksctl} command, part of UDisks, and GNOME Disks."
971 (handle-lid-switch-docked elogind-handle-lid-switch-docked 971 (handle-lid-switch-docked elogind-handle-lid-switch-docked
972 (default 'ignore)) 972 (default 'ignore))
973 (handle-lid-switch-external-power elogind-handle-lid-switch-external-power 973 (handle-lid-switch-external-power elogind-handle-lid-switch-external-power
974 (default 'ignore)) 974 (default *unspecified*))
975 (power-key-ignore-inhibited? elogind-power-key-ignore-inhibited? 975 (power-key-ignore-inhibited? elogind-power-key-ignore-inhibited?
976 (default #f)) 976 (default #f))
977 (suspend-key-ignore-inhibited? elogind-suspend-key-ignore-inhibited? 977 (suspend-key-ignore-inhibited? elogind-suspend-key-ignore-inhibited?
@@ -1032,7 +1032,9 @@ include the @command{udisksctl} command, part of UDisks, and GNOME Disks."
1032 (define handle-actions 1032 (define handle-actions
1033 '(ignore poweroff reboot halt kexec suspend hibernate hybrid-sleep lock)) 1033 '(ignore poweroff reboot halt kexec suspend hibernate hybrid-sleep lock))
1034 (define (handle-action x) 1034 (define (handle-action x)
1035 (enum x handle-actions)) 1035 (if (unspecified? x)
1036 "" ;empty serializer
1037 (enum x handle-actions)))
1036 (define (sleep-list tokens) 1038 (define (sleep-list tokens)
1037 (unless (valid-list? tokens char-set:user-name) 1039 (unless (valid-list? tokens char-set:user-name)
1038 (error "invalid sleep list" tokens)) 1040 (error "invalid sleep list" tokens))