Add new option for user defined tmux.conf.local
This commit is contained in:
parent
26d9ace1b4
commit
9ee9e74b1b
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue