-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flexible TMux Configuration Load #143
Conversation
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`.
I glanced at the PR and it looks good. I have 2 questions:
Thanks! |
Tabs/Spaces Variable |
@weilbith yea, let's remove the |
It has been decided that this feature should been removed until it will be requested.
Okay, done. Open questions:
|
@weilbith thanks!
I just added a short note via 42bb2bf. If you have a better idea feel free to open another PR. If the docs are more than a paragraph I'd prefer if it's placed in
I'm a heavy vim user, but I prefer not doing this in any of my public projects. I feel this discriminates all other editors, by indicating preference to vim. Contributors usually figure out the spacing. Having |
Hi. This improvement came at the right moment for me, but I'm struggling to make this work. Is expected that |
@gnumoksha u can do so manually by following this documentation. This is not done automatically by where-your-tmux-config-is. |
@weilbith this made the job, thanks! One thing I would like to add is that someone can expect |
@gnumosksha |
Does this PR resolve the issue involving nonstandard tmux paths? (#57) Can those of us who use tmux by calling it with Edit: Just tried and the answer is, yes we can. |
Flexible TMux Configuration Load
The current implementation is hard-coded about where to get the TMux configuration file for read in the listed plugins.
But TMux could be started with a different configuration file. Following the XDG Directory Specification for TMux as also suggested in the ArchWiki, the default location does not fit anymore. In that case the plugin manager is unusable.
To provide a more configurable solution, I've added a new function to search for the TMux configuration in prioritized order.
TMUX_PLUGIN_MANAGER_CONFIG_LOCATION
, which has the highest priority and can be set by the user to anything, regardless if it exists or not.XDG_CONFIG_HOME
directory is searched for an TMux entry.$HOME/.tmux.conf
is taken.The implementation is super simple, but allows user like me to be more flexible.