Tmux systemd service

This commit is contained in:
Sonny Bakker 2017-12-01 06:53:07 +01:00
parent 09813e83f3
commit 52f66b5de1
2 changed files with 23 additions and 1 deletions

View file

@ -1,8 +1,15 @@
#!/bin/bash #!/bin/bash
#tmux start-server; tmux start-server;
tmux new-session -d -s Main; tmux new-session -d -s Main;
tmux new-window -t Main; tmux new-window -t Main;
tmux new-window -t Main; tmux new-window -t Main;
tmux new-window -t Main;
tmux new-window -t Main;
tmux new-window -t Main;
tmux new-session -d -s Development; tmux new-session -d -s Development;
tmux new-window -t Development; tmux new-window -t Development;
tmux new-window -t Development; tmux new-window -t Development;
tmux new-window -t Development;
tmux new-window -t Development;
tmux new-window -t Development;
tmux new-window -t Development;

15
systemd/tmux@.service Normal file
View file

@ -0,0 +1,15 @@
[Unit]
Description=Start tmux in detached session
After=ssh.service
[Service]
User=%I
Environment=DISPLAY=:0
Environment=XAUTHORITY=/tmp/xauth-1000-_0
WorkingDirectory=/home/%I
ExecStart=/bin/bash /home/%I/.bin/tmux_start
RemainAfterExit=True
Type=oneshot
[Install]
WantedBy=default.target