[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. # 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 [Install] WantedBy=default.target