aboutsummaryrefslogtreecommitdiffstats
path: root/.config/systemd/user
diff options
context:
space:
mode:
Diffstat (limited to '.config/systemd/user')
-rw-r--r--.config/systemd/user/tmux.service13
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/systemd/user/tmux.service b/.config/systemd/user/tmux.service
new file mode 100644
index 0000000..084efc0
--- /dev/null
+++ b/.config/systemd/user/tmux.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Start tmux in detached session
+After=local-fs.target
+ConditionFileIsExecutable=/usr/bin/tmux
+
+[Service]
+Type=forking
+Environment=TMUX_TMPDIR=%t
+ExecStart=/usr/bin/tmux new-session -s user -d
+ExecStop=/usr/bin/tmux kill-session -t user
+
+[Install]
+WantedBy=default.target