tmux: use tpm to manage plugins

This commit is contained in:
Henrik Lissner 2016-11-10 18:30:54 +01:00
parent ba5f0d1d49
commit 2ab364fa93
4 changed files with 25 additions and 1 deletions

View file

@ -276,5 +276,17 @@ set -g message-bg colour5
## ##
run-shell "~/.dotfiles-new/shell/tmux/scripts/prefix-highlight.tmux" run-shell "~/.dotfiles-new/shell/tmux/scripts/prefix-highlight.tmux"
## User defined overrides # User defined overrides
if '[ -f ~/.tmux.local.conf ]' 'source ~/.tmux.local.conf' if '[ -f ~/.tmux.local.conf ]' 'source ~/.tmux.local.conf'
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# Start plugin manager
run '~/.tmux/plugins/tpm/tpm'

View file

View file

@ -11,3 +11,8 @@ case "$OSTYPE" in
sudo apt-get install -y tmux sudo apt-get install -y tmux
fi fi
esac esac
git-repo() { [[ -d $2 ]] || git clone "https://github.com/$1" "$2"; }
CWD="$(dirname $0)"
git-repo tmux-plugins/tpm "$CWD/.tmux/plugins/tpm"

7
shell/tmux/update Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
CWD="$(dirname $0)"
if [[ -d "$CWD/.tmux/plugins/tpm/bin" ]]; then
"$CWD/.tmux/plugins/tpm/bin/update_plugins" all
"$CWD/.tmux/plugins/tpm/bin/clean_plugins" all
fi