aboutsummaryrefslogtreecommitdiffstats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/irssi.service16
1 files changed, 16 insertions, 0 deletions
diff --git a/user/irssi.service b/user/irssi.service
new file mode 100644
index 0000000..5b0b351
--- /dev/null
+++ b/user/irssi.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Irssi in a separate tmux session
+After=network.target local-fs.target
+ConditionFileIsExecutable=/usr/bin/tmux
+ConditionFileIsExecutable=/usr/bin/weechat
+
+[Service]
+Type=forking
+KillMode=control-group
+Environment=TMUX_TMPDIR=/run/user/%U/tmux
+ExecStartPre=/usr/bin/mkdir -p $TMUX_TMPDIR
+ExecStart=/usr/bin/tmux -L irssi new-session -d -s irssi -n irssi irssi
+ExecStop=/usr/bin/tmux -L irssi send-keys -t irssi:1 /quit Enter
+
+[Install]
+WantedBy=default.target