[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: services: elogind: Fix default behavior for lid c
From: |
guix-commits |
Subject: |
branch master updated: services: elogind: Fix default behavior for lid close. |
Date: |
Wed, 10 Aug 2022 00:34:33 -0400 |
This is an automated email from the git hooks/post-receive script.
apteryx pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 59ee837d8b services: elogind: Fix default behavior for lid close.
59ee837d8b is described below
commit 59ee837d8b11d7d688045b601e8b240ccbdbe7c7
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Aug 9 23:51:48 2022 -0400
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>
---
doc/guix.texi | 2 +-
gnu/services/desktop.scm | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 99321929cc..86cfe7d49c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -22442,7 +22442,7 @@ their default values are:
@item handle-lid-switch-docked
@code{ignore}
@item handle-lid-switch-external-power
-@code{ignore}
+@code{*unspecified*}
@item power-key-ignore-inhibited?
@code{#f}
@item suspend-key-ignore-inhibited?
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 29a3722f1b..f891d1b5cc 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
-;;; Copyright © 2017, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017, 2020, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
@@ -971,7 +971,7 @@ include the @command{udisksctl} command, part of UDisks,
and GNOME Disks."
(handle-lid-switch-docked elogind-handle-lid-switch-docked
(default 'ignore))
(handle-lid-switch-external-power elogind-handle-lid-switch-external-power
- (default 'ignore))
+ (default *unspecified*))
(power-key-ignore-inhibited? elogind-power-key-ignore-inhibited?
(default #f))
(suspend-key-ignore-inhibited? elogind-suspend-key-ignore-inhibited?
@@ -1032,7 +1032,9 @@ include the @command{udisksctl} command, part of UDisks,
and GNOME Disks."
(define handle-actions
'(ignore poweroff reboot halt kexec suspend hibernate hybrid-sleep lock))
(define (handle-action x)
- (enum x handle-actions))
+ (if (unspecified? x)
+ "" ;empty serializer
+ (enum x handle-actions)))
(define (sleep-list tokens)
(unless (valid-list? tokens char-set:user-name)
(error "invalid sleep list" tokens))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: services: elogind: Fix default behavior for lid close.,
guix-commits <=