gpakosz / .tmux

🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
MIT License
21.8k stars 3.36k forks source link

Custom `.tmux.conf` and `.tmux.conf.local` location #586

Closed JinraeKim closed 1 year ago

JinraeKim commented 2 years ago

Hi,

I wanna use multiple configurations of tmux, so I'd like to locate conf files as e.g. ~/.foo/.tmux.conf and ~/.foo/.tmux.conf.local.

I used tmux -f ~/.foo/.tmux.conf" but the whole configuratoin seems not loaded.

How can I change this?

JinraeKim commented 2 years ago

I just changed the source code of .tmux/.tmux.conf to point other directories but I hope this can be configured to use multiple configuration files

gpakosz commented 1 year ago

Hello @JinraeKim 👋

I strongly recommend against modifying .tmux.conf.

Can you please try the gh-200+221+439+586 branch?

marco-silva0000 commented 1 year ago

I'm trying that branch with the ~/.conf/tmux config on an m1 mac and it's working fine. I had also tried to change the .tmux.conf file to point to the config dir but messed something up as it wasn't working propperly.

gpakosz commented 1 year ago

@marco-silva0000 Hello 👋

Can you please double check that the filenames don't start with a . when not in the home directory?

marco-silva0000 commented 1 year ago

yeah they are correct. Again, it's working fine, I was just reiterating that modifying the original .tmux.conf didn't work that well for me xD here's how I have it setup with /Users/msilva/libs/.tmux on branch gh-200+221+439+586

.config/tmux on  main [!+?]
➜ tree
.
├── tmux.conf -> /Users/msilva/libs/.tmux/.tmux.conf
└── tmux.conf.local
gpakosz commented 1 year ago

Ok good to know it's working for you 👍

marco-silva0000 commented 1 year ago

actually I have an issue, I've added set-environment -g TMUX_PLUGIN_MANAGER_PATH "~/.local/share/tmux/plugins/" on my ~/.conf/tmux/tmux.conf.local and reloading the conf it did create that directory for the pluggins, but only has the tpm plugin in it, and the log file just says "Invoking /Users/msilva/.local/share/tmux/plugins//tpm/bin/install_plugins ..." as you can see there's a doulbe // there and I think that's why it's not installing any pluggins.

will continue to investigate why is that.

marco-silva0000 commented 1 year ago

I fixed the above with changing the variable to not have the trailing slash, but I still don't get any other plugins downloaded to that directory :/

gpakosz commented 1 year ago

Does the ~/.local/share/tmux/plugins path exist?

gpakosz commented 1 year ago

Commit ac814b64117470ee74a11efc9cc9f7f5cdf5094d in gh-200+221+439+586 makes plugins work

marco-silva0000 commented 1 year ago

it does make them work indeed. ty

gpakosz commented 1 year ago

Thanks for testing and for the support!