tpm icon indicating copy to clipboard operation
tpm copied to clipboard

plugins directory should not be under ~/.config

Open tigerinus opened this issue 3 years ago • 4 comments

~/.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.

tigerinus avatar Nov 20 '21 14:11 tigerinus

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

trallnag avatar Aug 01 '22 17:08 trallnag

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/"

walkie avatar Aug 23 '22 06:08 walkie

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?

baggiponte avatar Nov 20 '22 14:11 baggiponte

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"

edentsai avatar Jan 15 '23 22:01 edentsai