aboutsummaryrefslogtreecommitdiffstats
path: root/user
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2015-06-28 14:28:25 +0200
committerDavid Runge <dave@sleepmap.de>2015-06-28 14:28:25 +0200
commitf93f71fed31385f25bb19dc5422220644d1747fc (patch)
treef12c2bcbbcdd70ddefcc5317f2e3f064f9f1918a /user
parente7908f5deb220c18a1d2c7358004999717e6311c (diff)
downloaduenv-f93f71fed31385f25bb19dc5422220644d1747fc.tar.gz
uenv-f93f71fed31385f25bb19dc5422220644d1747fc.tar.bz2
uenv-f93f71fed31385f25bb19dc5422220644d1747fc.tar.xz
uenv-f93f71fed31385f25bb19dc5422220644d1747fc.zip
user/weechat.service: Adding weechat as a new tmux driven environment in a systemd --user service
Diffstat (limited to 'user')
-rw-r--r--user/weechat.service16
1 files changed, 16 insertions, 0 deletions
diff --git a/user/weechat.service b/user/weechat.service
new file mode 100644
index 0000000..0aa620b
--- /dev/null
+++ b/user/weechat.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=WeeChat 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 weechat new-session -d -s weechat -n weechat weechat
+ExecStop=/usr/bin/tmux -L weechat send-keys -t weechat:1 /quit Enter
+
+[Install]
+WantedBy=default.target