Commit Graph

13 Commits

Author SHA1 Message Date
Raul E Rangel 4feba4c714
Merge 5edba1c1d1 into 59f78857f6 2020-07-08 10:53:25 -07:00
Geoffrey Frogeye 7c3a16e243
Default value for XDG_CONFIG_HOME 2019-07-16 20:58:31 +02:00
Raul E Rangel 5edba1c1d1 Use the running tmux server to get @plugins or start a new server
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
2019-02-20 13:04:33 -07:00
Raul E Rangel 33c5d9a3af Re-order private functions to make the following diff easier to read 2019-02-20 13:02:40 -07:00
Thore Weilbier 0e46b92aba
Remove _CONFIG_LOCATION variable again.
It has been decided that this feature should been removed until it will be requested.
2018-11-07 09:31:21 +01:00
Thore Weilbier 206ded75d8
Restore tabs instead of spaces for indentation. 2018-11-04 11:19:28 +01:00
Thore Weilbier 2c4a2dfd65
Add flexible tmux configuration load function.
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`.
2018-11-02 13:07:53 +01:00
Graham McGregor 1579534c2e Prevent clean_plugins from deleting root
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
2016-12-03 12:06:29 -05:00
JackDrogon a44cab3fcf Fix plugin line start with tab problem 2016-02-01 14:41:50 +08:00
Bruno Sutic 620f06c524
Undeprecate 'set -g @tpm_plugins' 2015-12-14 01:22:40 +01:00
Treri a6e34acf0e match 'set-option -g @plugin' and 'set -g @plugin' 2015-09-08 16:38:15 +08:00
Bruno Sutic d70df24051
Support plugin definition in sourced files 2015-08-03 23:01:22 +02:00
Bruno Sutic 9be7f975e9
Move all helpers to 'helpers/' dir 2015-08-03 17:56:45 +02:00
Renamed from scripts/shared_functions.sh (Browse further)