From 597984968f279b6c9bb65b264d0d979baf93cfa5 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Thu, 6 Dec 2018 19:25:18 -0500 Subject: [PATCH] fix tmux-continuum, autostart tmux --- files/.config/systemd/user/tmux.service | 11 +++++++++++ files/.tmux.conf | 11 ++++++----- scripts/post-install.sh | 8 +++++++- 3 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 files/.config/systemd/user/tmux.service diff --git a/files/.config/systemd/user/tmux.service b/files/.config/systemd/user/tmux.service new file mode 100644 index 0000000..b537745 --- /dev/null +++ b/files/.config/systemd/user/tmux.service @@ -0,0 +1,11 @@ +[Unit] +Description=Start tmux in detached session + +[Service] +Type=forking +ExecStart=/usr/bin/tmux new-session -s %u -d +ExecStop=/usr/bin/tmux kill-session -t %u + +[Install] +WantedBy=multi-user.target + diff --git a/files/.tmux.conf b/files/.tmux.conf index 17b7a0d..d74e993 100644 --- a/files/.tmux.conf +++ b/files/.tmux.conf @@ -55,10 +55,10 @@ set -g status-right '#U@#H' set -g @resurrect-capture-pane-contents 'on' # Also resurect the vim session -# for vim -set -g @resurrect-strategy-vim 'session' -# for neovim -set -g @resurrect-strategy-nvim 'session' +set -g @resurrect-strategy-vim 'session' # for vim +set -g @resurrect-strategy-nvim 'session' # for neovim +# additional process to restore +set -g @resurrect-processes 'ssh watch' # Save every 5 minutes set -g @continuum-save-interval '5' @@ -72,7 +72,8 @@ set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'soyuka/tmux-current-pane-hostname' set -g @plugin 'christoomey/vim-tmux-navigator' set -g @plugin 'tmux-plugins/tmux-resurrect' -set -g @plugin 'tmux-plugins/tmux-continuum' +#set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'git@github.com:badjware/tmux-continuum.git' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run -b '~/.tmux/plugins/tpm/tpm' diff --git a/scripts/post-install.sh b/scripts/post-install.sh index addcfcd..3c174ac 100644 --- a/scripts/post-install.sh +++ b/scripts/post-install.sh @@ -3,5 +3,11 @@ # install vim plugins vim -E +"call dein#update()" +"qall!" /dev/null &>/dev/null -systemctl --user enable mpv.service +# install tmux plugins +~/.tmux/plugins/tpm/bin/install_plugins +~/.tmux/plugins/tpm/bin/clean_plugins + +systemctl --user daemon-reload +systemctl --user enable --now tmux.service +systemctl --user enable --now mpv.service