aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/etc/systemd/logind.conf.d
diff options
context:
space:
mode:
Diffstat (limited to 'etc/systemd/logind.conf.d')
-rw-r--r--etc/systemd/logind.conf.d/20-lid-ac.conf14
1 files changed, 14 insertions, 0 deletions
diff --git a/etc/systemd/logind.conf.d/20-lid-ac.conf b/etc/systemd/logind.conf.d/20-lid-ac.conf
new file mode 100644
index 0000000..08e5014
--- /dev/null
+++ b/etc/systemd/logind.conf.d/20-lid-ac.conf
@@ -0,0 +1,14 @@
+[Login]
+# Suspend policy: closing the lid suspends ONLY when on battery. When
+# AC is connected the lid switch is ignored entirely. The rationale is
+# simple and matches user mental model -- if you don't want the
+# machine to sleep, plug it in.
+#
+# This obsoletes the previous SSH/zellij-aware inhibit machinery: any
+# long-running task (build, download, SSH session, server) just needs
+# AC and will never be suspended out from under itself.
+#
+# `HandleLidSwitch` (default = suspend) still applies on battery.
+# `HandleLidSwitchDocked` (default = ignore) still applies when an
+# external monitor / dock is attached.
+HandleLidSwitchExternalPower=ignore