From c3148116fb23c6a6f0fdde139c08a270f6b90ff1 Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Sun, 3 Mar 2024 17:04:13 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(tmux):=20Restart=20server=20on?= =?UTF-8?q?=20boot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/systemd/user/tmux.service | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .config/systemd/user/tmux.service diff --git a/.config/systemd/user/tmux.service b/.config/systemd/user/tmux.service new file mode 100644 index 0000000..1b9bef3 --- /dev/null +++ b/.config/systemd/user/tmux.service @@ -0,0 +1,17 @@ +[Unit] +Description=tmux default session (detached) +Documentation=man:tmux(1) + +[Service] +Type=forking +Environment=DISPLAY=:0 +ExecStart=/usr/bin/tmux new-session -d + +ExecStop=/home/marley/.tmux/plugins/tmux-resurrect/scripts/save.sh +ExecStop=/usr/bin/tmux kill-server +KillMode=control-group + +RestartSec=2 + +[Install] +WantedBy=default.target