aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/systemd/user/zellij-inhibit-suspend.path
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/systemd/user/zellij-inhibit-suspend.path')
-rw-r--r--dot_config/systemd/user/zellij-inhibit-suspend.path12
1 files changed, 12 insertions, 0 deletions
diff --git a/dot_config/systemd/user/zellij-inhibit-suspend.path b/dot_config/systemd/user/zellij-inhibit-suspend.path
new file mode 100644
index 0000000..72c509c
--- /dev/null
+++ b/dot_config/systemd/user/zellij-inhibit-suspend.path
@@ -0,0 +1,12 @@
+[Unit]
+Description=Activate suspend inhibitor whenever zellij has a live session
+
+[Path]
+# %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.
+DirectoryNotEmpty=%t/zellij
+Unit=zellij-inhibit-suspend.service
+
+[Install]
+WantedBy=default.target