Mark Pitt
claude-skills
  1. claude-skills
  2. Developer environment
  3. tmux-persist
  4. scripts/systemd/tmux-session.service

A file in tmux-persist

scripts/systemd/tmux-session.service

INI 13 lines 375 B
tmux-session.serviceINI, shown as text and never run
[Unit]
Description=Restore tmux sessions from the last snapshot (and save them on stop)

[Service]
Type=oneshot
RemainAfterExit=yes
# The tmux server started by restore lives in this unit's cgroup; keep it when the unit is stopped.
KillMode=process
ExecStart=%h/.local/bin/tmux-session restore
ExecStop=-%h/.local/bin/tmux-session snapshot

[Install]
WantedBy=default.target