1
0
Fork 0
mirror of synced 2024-12-13 19:05:45 -05:00

Add new option for user defined tmux.conf.local

This commit is contained in:
Spencer Butler 2019-10-24 20:13:10 -05:00
parent 26d9ace1b4
commit 9ee9e74b1b

View file

@ -20,11 +20,20 @@ _CACHED_TPM_PATH="$(_tpm_path)"
# #
_get_user_tmux_conf() { _get_user_tmux_conf() {
# Define the different possible locations. # 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" xdg_location="$XDG_CONFIG_HOME/tmux/tmux.conf"
default_location="$HOME/.tmux.conf" default_location="$HOME/.tmux.conf"
# Search for the correct configuration file by priority. # 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" echo "$xdg_location"
else else