Linux: Modifications to allow session restoration

pull/83/head
aguy tech 2020-11-21 23:26:01 +01:00
parent 26eb5ffce0
commit 4c6b1daf74
2 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,7 @@ template() {
[Service]
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/tmux ${systemd_tmux_server_start_cmd}
ExecStart="${systemd_tmux_server_start_cmd_default}"
ExecStop=${HOME}/.tmux/plugins/tmux-resurrect/scripts/save.sh
ExecStop=/usr/bin/tmux kill-server

View File

@ -36,5 +36,6 @@ status_wrap_string="\#{value}"
systemd_service_name="tmux.service"
systemd_unit_file_path="$HOME/.config/systemd/user/${systemd_service_name}"
tmux_server_session_temporary="tmux-continuum-tmp"
systemd_tmux_server_start_cmd_option="@continuum-systemd-start-cmd"
systemd_tmux_server_start_cmd_default="new-session -d"
systemd_tmux_server_start_cmd_default="/usr/bin/tmux ${systemd_tmux_server_start_cmd} -s ${tmux_server_session_temporary} && /usr/bin/tmux kill-session -t ${tmux_server_session_temporary}"