blob: 7c73c643d6f3247bd44d0ec9fc1be5a74d4dcc6c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
[Unit]
Description=Stay alive while any zellij session exists; inhibit suspend if SSH-spawned
Documentation=man:systemd-inhibit(1) man:zellij(1)
# Independent of any graphical session: this is meant to run on
# headless SSH-attached hosts too. The watcher itself decides whether
# the current zellij activity warrants inhibiting (SSH-spawned only),
# and acquires/releases its own systemd-inhibit lock dynamically. It
# stays alive for the whole zellij dir lifetime so the .path unit does
# not retrigger us in a busy loop when only local zellij sessions are
# active.
# Disable systemd's default start-rate limiter: even though the
# refactored watcher should not cycle anymore, a zero rate-limit makes
# this unit resilient if the user kills it manually.
StartLimitIntervalSec=0
[Service]
Type=simple
ExecStart=%h/.local/bin/zellij-inhibit-watcher
# Don't auto-restart: the .path unit reactivates us on the next session.
Restart=no
[Install]
WantedBy=default.target
|