An alternative to the default status-right based auto-save that uses a systemd user timer instead.
The default auto-save mechanism uses #() command substitution in tmux's status-right. This command runs on every status bar refresh for every attached client. With many sessions and clients, this can cause significant CPU overhead.
A systemd timer runs the save script once per interval, regardless of the number of sessions or clients.
Copy the unit files to your systemd user directory:
cp systemd/tmux-resurrect-save.service ~/.config/systemd/user/
cp systemd/tmux-resurrect-save.timer ~/.config/systemd/user/Adjust the path in the service file if your tmux-resurrect is installed somewhere other than ~/.tmux/plugins/tmux-resurrect/.
Enable and start the timer:
systemctl --user daemon-reload
systemctl --user enable --now tmux-resurrect-save.timerThen disable the status-right based auto-save in your tmux.conf:
set -g @continuum-save-interval '0'Check the timer status:
systemctl --user list-timers | grep tmuxManually trigger a save:
systemctl --user start tmux-resurrect-save.service