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

plugins directory should not be under ~/.config #215

Open
tigerinus opened this issue Nov 20, 2021 · 4 comments
Open

plugins directory should not be under ~/.config #215

tigerinus opened this issue Nov 20, 2021 · 4 comments

Comments

@tigerinus
Copy link

~/.config is generally for configuration only, where plugin directory contains more than just configuration.

Plus .config can be version controlled, but plugin subdirectory might already have .git/ already.

@trallnag
Copy link

trallnag commented Aug 1, 2022

What would you prefer? ~/.local/share? Tons of shell apps dump stuff like plugins into /.config. Fish for example.

@walkie
Copy link

walkie commented Aug 23, 2022

Yes, ~/.local/share ($XDG_DATA_SHARE) would be the correct place to put it. As @tigerinus said, ~/.config ($XDG_CONFIG_HOME) is supposed to be for configuration files only.

When tools respect this distinction, it makes it much easier to sync configurations across systems, among other benefits.

Fortunately, it's easy to tell TPM to install them to the right place. Just add this to your tmux.conf:

set-environment -g TMUX_PLUGIN_MANAGER_PATH "~/.local/share/tmux/plugins/"

@baggiponte
Copy link

About this:

set-environment -g TMUX_PLUGIN_MANAGER_PATH "~/.local/share/tmux/plugins/"

Could I use set-environment -g TMUX_PLUGIN_MANAGER_PATH "$XDG_DATA_HOME/tmux/plugins/", or tmux does not perform expansion?

@edentsai
Copy link

edentsai commented Jan 15, 2023

Try add -F flag to expand format, for example:

Usage: man tmux

set-environment [-Fhgru] [-t target-session] name [value]

..., If -F is present, then value is expanded as a format. ...

- set-environment -g TMUX_PLUGIN_MANAGER_PATH "$XDG_DATA_HOME/tmux/plugins/"
+ set-environment -g -F TMUX_PLUGIN_MANAGER_PATH "${XDG_DATA_HOME}/tmux/plugins"

RossBarnie added a commit to RossBarnie/dotfiles that referenced this issue Aug 23, 2023
Makes the tmux config directory much more shareable as the plugins would
install to this checked-in directory caused by the symbolic link, so
either we ignore the directory or move the plugin install location. In
this case the latter made sense and is discussed further in this issue
tmux-plugins/tpm#215.
Freed-Wu added a commit to Freed-Wu/tpm that referenced this issue Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants