2019-02-04 14:27:49 +00:00
|
|
|
# Clone tmux plugin manager if not existing
|
|
|
|
if [[ -z "$TPM_PARENT_DIR" ]]; then
|
2019-02-24 23:38:18 +00:00
|
|
|
TPM_PARENT_DIR=${XDG_CONFIG_DIR:-$HOME/.config}/tmux
|
2019-02-04 14:27:49 +00:00
|
|
|
fi
|
2019-02-24 23:38:18 +00:00
|
|
|
|
|
|
|
if [[ ! -f $TPM_PARENT_DIR/plugins/tpm/tpm ]]; then
|
2019-02-04 14:27:49 +00:00
|
|
|
if [[ ! -d "$TPM_PARENT_DIR" ]]; then
|
|
|
|
mkdir -p "$TPM_PARENT_DIR"
|
|
|
|
fi
|
|
|
|
pushd $TPM_PARENT_DIR
|
2019-02-24 23:38:18 +00:00
|
|
|
git clone https://github.com/tmux-plugins/tpm plugins/tpm
|
2019-02-04 14:27:49 +00:00
|
|
|
popd
|
|
|
|
fi
|
2019-02-24 23:38:18 +00:00
|
|
|
|
|
|
|
export TMUX_PLUGIN_MANAGER_PATH=$TPM_PARENT_DIR/plugins
|
|
|
|
alias tmux="tmux -f ${TPM_PARENT_DIR}/tmux.conf"
|
|
|
|
|
2019-02-04 14:27:49 +00:00
|
|
|
unset TPM_PARENT_DIR
|
2019-02-24 23:38:18 +00:00
|
|
|
unset TPM_SUB_DIR
|
|
|
|
|