Skip to content
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

Enable non-default conf files #57

Open
macarenomarco opened this issue Oct 22, 2015 · 9 comments

Comments

@macarenomarco
Copy link

commented Oct 22, 2015

When using a file that isn't /etc/tmux.conf ~/.tmux.conf tpm doesn't load the plugin list. Not sure if it'd be better to include a separate .tmux/tpm.conf file which could include the location of the tmux config file.

@bruno-

This comment has been minimized.

Copy link
Member

commented Oct 22, 2015

Hey,
yea, this is a known issue. If tmux server is started with -f flag (tmux -f /some/path/to/conf.file) it will not load the new plugin syntax. I'm not sure this can be fixed.

There are 2 solutions for this:

1: you can use legacy plugin list definition in /some/path/to/conf.file, example:

set -g @tpm_plugins '\
  tmux-plugins/tmux-foo \
  tmux-plugins/tmux-bar \
'

2: you might just source another config file from ~/.tmux.conf, example:

source /some/path/to/conf.file

Quick question: why do you even use a different config file?

@bruno- bruno- added the bug label Oct 22, 2015

@macarenomarco

This comment has been minimized.

Copy link
Author

commented Oct 23, 2015

Hey, sorry for taking so long and for not checking if this had been previously reported, my bad.
About the different config file, I use multiple OS's and would like to keep my configurations for tmux separate, however I imagine it might not be the most popular case, but that's why the second solution wouldn't always work.
It'd be awesome if tmux could return the location of it's config file but I haven't found anything of sorts, but I understand that having a single config file is way cooler and easier to use.
What about an optional @plugin-conf option? Or am I completely misunderstanding how the "@" functionality works?

@bruno-

This comment has been minimized.

Copy link
Member

commented Oct 23, 2015

It'd be awesome if tmux could return the location of it's config file but I haven't found anything of sorts

Yea, I also couldn't find anything for this. I think tmux maintainers could add a flag for this if we ask them. Wanna give it a try on tmux-users group?

What about an optional @plugin-conf option?

Can you elaborate this a bit? With this option: set -g @plugin-conf '/some/path/to/conf.file' tpm would read plugins from the additional file. But I think this is similar to just having source /some/path/to/conf.file.

Also, as mentioned above, the older syntax using @tpm_plugins is still supported. Did you try that one?

@macarenomarco

This comment has been minimized.

Copy link
Author

commented Oct 24, 2015

No, I haven't. I figured out that if it's a depecrated syntax there must be a good reason for it. But yeah you're right, I completely forgot about the fact that in order to load those values it's necessary to read the main conf file which is the issue.

I think I'll try with the tmux-users group and if that work update you on the situation.

@bruno-

This comment has been minimized.

Copy link
Member

commented Oct 24, 2015

Hey, the reason for deprecating @tpm_plugins is that the new syntax looks better and is easier to work with. Other than that things work the same.
If tmux core team won't provide a patch for this we'll un-deprecate @tpm_plugins, continue supporting it and just call it "old syntax".

@bruno-

This comment has been minimized.

Copy link
Member

commented Oct 24, 2015

I see tmux creator just responded positively to your request on tmux-users list.

@macarenomarco would you please forward that last message from the mailing list to my email? I'd like to respond to that thread, but it seems I need to have the email. I'm unable to respond via the web interface. Thanks

@charlesbjohnson

This comment has been minimized.

Copy link

commented Oct 28, 2015

This is also an issue for me (though I'm okay if I continue to use the old syntax).

I use a main tmux.conf that hooks up to a host specific tmux.conf.local and a plugin centric tmux.conf.plugins. Both of those files are are being sourced but tpm is unable to pick up on their contents (presumably because the sourcing happens conditionally at runtime?).

I support the un-deprecation of @tpm_plugins.

@bruno-

This comment has been minimized.

Copy link
Member

commented Dec 14, 2015

Hi guys,
the @tpm_plugins is un-deprecated with 620f06c.

The issue with tmux custom config file using -f option is now documented here. The solution using @tpm_plugins is suggested.

@HaleTom

This comment has been minimized.

Copy link

commented Sep 12, 2018

FYI, anyone trying to follow the XDG Base Directory specification will run into this issue.

Arch users are directed to:

$ tmux -f "$XDG_CONFIG_HOME"/tmux/tmux.conf
$ export TMUX_TMPDIR="$XDG_RUNTIME_DIR"

https://wiki.archlinux.org/index.php/XDG_Base_Directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.