systemd: use systemd to start tmux server

This commit is contained in:
Vincent Bernat 2020-01-29 05:45:38 +01:00
parent 2463736fdc
commit 95dd95e4ce
4 changed files with 9 additions and 1 deletions

View file

@ -4,6 +4,7 @@ PartOf=graphical-session@%i.target
After=autorandr@%i.service
After=compton@%i.service
After=xsettingsd@%i.service
After=tmux.service
Before=nm-applet@%i.service
[Service]

View file

@ -12,3 +12,4 @@ Wants=redshift@%i.service
Wants=xiccd@%i.service
Wants=xsettingsd@%i.service
Wants=xss-lock@%i.service
Wants=tmux.service

7
systemd/tmux.service Normal file
View file

@ -0,0 +1,7 @@
[Unit]
Description=tmux session
[Service]
RemainAfterExit=yes
ExecStart=/usr/bin/tmux start-server
ExecStop=/usr/bin/tmux kill-server

View file

@ -21,7 +21,6 @@ export QT_AUTO_SCREEN_SCALE_FACTOR=1
# Services are started with systemd
systemctl --user import-environment
systemd-run -q --scope --user tmux start-server
mkdir -p ~/.config/systemd
ln -nsf ~/.config/awesome/systemd ~/.config/systemd/user
systemctl --user daemon-reload