aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config')
-rw-r--r--dot_config/systemd/user/zellij-inhibit-suspend.path3
-rw-r--r--dot_config/systemd/user/zellij-inhibit-suspend.service6
2 files changed, 7 insertions, 2 deletions
diff --git a/dot_config/systemd/user/zellij-inhibit-suspend.path b/dot_config/systemd/user/zellij-inhibit-suspend.path
index 72c509c..2a4be21 100644
--- a/dot_config/systemd/user/zellij-inhibit-suspend.path
+++ b/dot_config/systemd/user/zellij-inhibit-suspend.path
@@ -5,6 +5,9 @@ Description=Activate suspend inhibitor whenever zellij has a live session
# %t expands to $XDG_RUNTIME_DIR (typically /run/user/$UID); zellij keeps
# its per-version session sockets under this directory. Whenever the dir
# transitions from empty to non-empty, the service is (re)activated.
+# The service's watcher then decides whether to actually hold the lock
+# (only if at least one zellij was spawned from an SSH session); if not,
+# it exits immediately and the service stops with no harm done.
DirectoryNotEmpty=%t/zellij
Unit=zellij-inhibit-suspend.service
diff --git a/dot_config/systemd/user/zellij-inhibit-suspend.service b/dot_config/systemd/user/zellij-inhibit-suspend.service
index 9e9ab40..ed15fff 100644
--- a/dot_config/systemd/user/zellij-inhibit-suspend.service
+++ b/dot_config/systemd/user/zellij-inhibit-suspend.service
@@ -1,8 +1,10 @@
[Unit]
-Description=Hold a systemd-inhibit lock while zellij sessions exist
+Description=Hold a systemd-inhibit lock while SSH-spawned zellij sessions exist
Documentation=man:systemd-inhibit(1) man:zellij(1)
# Independent of any graphical session: this is meant to run on
-# headless SSH-attached hosts too.
+# headless SSH-attached hosts too. The watcher itself decides whether
+# the current zellij activity warrants inhibiting (SSH-spawned only),
+# so a local zellij session won't keep the laptop awake.
[Service]
Type=simple