From fa7655977edfc033be071e36206b967bcf74208d Mon Sep 17 00:00:00 2001 From: Andrey Kaipov Date: Thu, 11 Mar 2021 15:28:28 -0500 Subject: [PATCH] relax condition for XDG-compatible plugin path Instead of checking for the existence of the file `$XDG_CONFIG_HOME/tmux/tmux.conf`, we only check for the existence of the directory `$XDG_CONFIG_HOME/tmux`. --- docs/changing_plugins_install_dir.md | 4 ++-- tpm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/changing_plugins_install_dir.md b/docs/changing_plugins_install_dir.md index 27de96d..dcacab7 100644 --- a/docs/changing_plugins_install_dir.md +++ b/docs/changing_plugins_install_dir.md @@ -1,8 +1,8 @@ # Changing plugins install dir By default, TPM installs plugins in a subfolder named `plugins/` inside -`$XDG_CONFIG_HOME/tmux/` if a `tmux.conf` file was found at that location, or -inside `~/.tmux/` otherwise. +`$XDG_CONFIG_HOME/tmux/` if that directory exists, or inside `~/.tmux/` +otherwise. You can change the install path by putting this in `.tmux.conf`: diff --git a/tpm b/tpm index 7ad4b99..34f6b98 100755 --- a/tpm +++ b/tpm @@ -27,7 +27,7 @@ set_default_tpm_path() { local xdg_tmux_path="${XDG_CONFIG_HOME:-$HOME/.config}/tmux" local tpm_path="$DEFAULT_TPM_PATH" - if [ -f "$xdg_tmux_path/tmux.conf" ]; then + if [ -d "$xdg_tmux_path" ]; then tpm_path="$xdg_tmux_path/plugins/" fi