I normally start my tmux server with a script because I don't have a
.tmux.config.
i.e.,
tmux set -g @plugin 'tmux-plugins/tmux-resurrect' \; ...
This change makes it so that @plugins is sourced from the currently
running tmux server instead of spinning up a new one. This also means
that we no longer need to manually parse the configs.
There was also a problem that _tpm_path would not work correctly if
using $XDG_CONFIG_HOME/tmux/tmux.conf because tmux by default doesn't
check that path.
I tested this with both inside and outside tmux by running
./tpm/bin/install_plugin
Add function `_get_user_tmux_conf` to helper script `plugin_functions`.
Function is searching for the users tmux configuration on multiple
places by a prioritized order.
The response is used within`_tmux_conf_contents` to read in the content
as normally.
Add new environment variable `TMUX_PLUGIN_MANAGER_CONFIG_LOCATION` which
is optional to be defined.
If so it has the highest priority to be loaded, despite if the file
exist or not.
XDG directory support has been added as well by the second priority
location at `$XDG_CONFIG_HOME/tmux/tmux.conf`.
If tmux was not yet configured to initialize the Tmux Plugin Manager,
the variable for the plugin home was not being set. This was resulting
in a `rm -rf /` which is pretty nuclear.
Fixes: https://github.com/tmux-plugins/tpm/issues/58