diff --git a/scripts/variables.sh b/scripts/variables.sh index 5601a86..2e4b8fc 100644 --- a/scripts/variables.sh +++ b/scripts/variables.sh @@ -10,4 +10,3 @@ default_clean_key="M-u" SUPPORTED_TMUX_VERSION="1.9" DEFAULT_TPM_ENV_VAR_NAME="TMUX_PLUGIN_MANAGER_PATH" -DEFAULT_TPM_PATH="$HOME/.tmux/plugins/" diff --git a/tpm b/tpm index 570d58b..ac68771 100755 --- a/tpm +++ b/tpm @@ -17,22 +17,9 @@ get_tmux_option() { fi } -tpm_path_set() { - tmux show-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" >/dev/null 2>&1 -} - -set_default_tpm_path() { - tmux set-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" "$DEFAULT_TPM_PATH" -} - -# Ensures TMUX_PLUGIN_MANAGER_PATH global env variable is set. -# -# Put this in `.tmux.conf` to override the default: -# `set-environment -g TMUX_PLUGIN_MANAGER_PATH "/some/other/path/"` +# Set TMUX_PLUGIN_MANAGER_PATH global env variable. set_tpm_path() { - if ! tpm_path_set; then - set_default_tpm_path - fi + tmux set-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" "$CURRENT_DIR/../" } # 1. Fetches plugin names from `@plugin` variables