From 9ee9e74b1bddb5679f8986b26d5493386058a5ef Mon Sep 17 00:00:00 2001 From: Spencer Butler Date: Thu, 24 Oct 2019 20:13:10 -0500 Subject: [PATCH] Add new option for user defined tmux.conf.local --- scripts/helpers/plugin_functions.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/helpers/plugin_functions.sh b/scripts/helpers/plugin_functions.sh index cbd1b55..be674c5 100644 --- a/scripts/helpers/plugin_functions.sh +++ b/scripts/helpers/plugin_functions.sh @@ -20,11 +20,20 @@ _CACHED_TPM_PATH="$(_tpm_path)" # _get_user_tmux_conf() { # Define the different possible locations. + # + # Allow user defined config file location + # Add the following to your config file + # set -g @tpm_conf_default_location '/path/to/tmux.conf.local' + + user_location="$(tmux show-options -gqv @tpm_conf_default_location)" xdg_location="$XDG_CONFIG_HOME/tmux/tmux.conf" default_location="$HOME/.tmux.conf" # Search for the correct configuration file by priority. - if [ -f "$xdg_location" ]; then + if [ -f "$user_location" ]; then + echo "$user_location" + + elif [ -f "$xdg_location" ]; then echo "$xdg_location" else