aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/systemd/user/zellij-inhibit-suspend.path
blob: 2a4be216e6cd7d7bb280dcd0dc1c433d50c8aff8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[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