tmux-plugins / tpm

Tmux Plugin Manager
MIT License
11.9k stars 417 forks source link

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

Open tigerinus opened 2 years ago

tigerinus commented 2 years ago

~/.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 commented 2 years ago

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

walkie commented 2 years ago

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 commented 1 year ago

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 commented 1 year ago

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"