diff --git a/.tmux.conf b/.tmux.conf index 97329b0..cd065a4 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1426,7 +1426,9 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration' # tmux_conf_update_plugins_on_reload="$3" # tmux_conf_uninstall_plugins_on_reload="$4" # -# TMUX_PLUGIN_MANAGER_PATH=${TMUX_PLUGIN_MANAGER_PATH:-$(dirname "$TMUX_CONF")/plugins} +# if [ -z "$TMUX_PLUGIN_MANAGER_PATH" ]; then +# return 255 +# fi # mkdir -p "$TMUX_PLUGIN_MANAGER_PATH" # # tpm_plugins=$(tmux show -gvq '@tpm_plugins' 2>/dev/null) @@ -1459,7 +1461,6 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration' # ;s/(install_plugin(.(?!&))*)\n(\s+)done/\1&\n\3done\n\3wait/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/install_plugins.sh" # perl -p -i -e 's/git submodule update --init --recursive(?!\s+--depth\s+1)/git submodule update --init --recursive --depth 1/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/update_plugin.sh" # perl -p -i -e 's,\$tmux_file\s+>/dev/null\s+2>\&1,$& || { tmux display "Plugin \$(basename \${plugin_path}) failed" && false; },' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/source_plugins.sh" -# tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH" # fi # if [ "$update_tpm" = "true" ]; then # { @@ -1502,7 +1503,19 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration' # tmux_conf_update_plugins_on_launch=${tmux_conf_update_plugins_on_launch:-true} # tmux_conf_update_plugins_on_reload=${tmux_conf_update_plugins_on_reload:-true} # tmux_conf_uninstall_plugins_on_reload=${tmux_conf_uninstall_plugins_on_reload:-true} -# tmux run -b "cut -c3- '$TMUX_CONF' | sh -s __apply_plugins '$window_active' '$tmux_conf_update_plugins_on_launch' '$tmux_conf_update_plugins_on_reload' '$tmux_conf_uninstall_plugins_on_reload'" +# +# tpm_plugins=$(tmux show -gvq '@tpm_plugins' 2>/dev/null) +# if [ -n "$(tmux show -gv '@plugin' 2>/dev/null)" ] || [ -n "$tpm_plugins" ]; then +# if [ -z "$TMUX_PLUGIN_MANAGER_PATH" ]; then +# if [ "$(dirname "$TMUX_CONF")" = "$HOME" ]; then +# TMUX_PLUGIN_MANAGER_PATH="$HOME/.tmux/plugins" +# else +# TMUX_PLUGIN_MANAGER_PATH="$(dirname "$TMUX_CONF")/plugins" +# fi +# tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH" +# fi +# tmux run -b "cut -c3- '$TMUX_CONF' | sh -s __apply_plugins '$window_active' '$tmux_conf_update_plugins_on_launch' '$tmux_conf_update_plugins_on_reload' '$tmux_conf_uninstall_plugins_on_reload'" +# fi # } # # _apply_important() {