mirror of https://github.com/tmux-plugins/tpm
parent
27facedfd5
commit
d57df1108d
@ -0,0 +1,12 @@ |
||||
# Automatic tpm installation |
||||
|
||||
One of the first things we do on a new machine is cloning our dotfiles. Not everything comes with them though, so for example `tpm` most likely won't be installed. |
||||
|
||||
If you wanna install `tpm` automatically when tmux is started, put the following snippet in `.tmux.conf` before the final `run '~/.tmux/plugins/tpm/tpm'`: |
||||
|
||||
``` |
||||
if "test ! -d ~/.tmux/plugins/tpm" \ |
||||
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'" |
||||
``` |
||||
|
||||
This useful tip was submitted by @acr4. |
@ -0,0 +1,14 @@ |
||||
# Changing plugins install dir |
||||
|
||||
By default, TPM installs plugins to `~/.tmux/plugins/`. |
||||
|
||||
You can change the install path by putting this in `.tmux.conf`: |
||||
|
||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '/some/other/path/' |
||||
|
||||
Tmux plugin manager initialization in `.tmux.conf` should also be updated: |
||||
|
||||
# initializes TMUX plugin manager in a new path |
||||
run /some/other/path/tpm/tpm |
||||
|
||||
Please make sure that the `run` line is at the very bottom of `.tmux.conf`. |
@ -0,0 +1,20 @@ |
||||
# Installing plugins via the command line only |
||||
|
||||
### From inside tmux |
||||
|
||||
When you have `tmux` running, plugins can be installed with the following command: |
||||
|
||||
~/.tmux/plugins/tpm/scripts/install_plugins.sh |
||||
|
||||
This is the equivalent of pressing `prefix + I`. |
||||
|
||||
### From outside tmux |
||||
|
||||
To install the plugins when `tmux` is not even started (for example in a provisioning script): |
||||
|
||||
# start tmux and create a session but don't attach to it |
||||
tmux new-session -d |
||||
# install the plugins |
||||
tmux run "~/.tmux/plugins/tpm/scripts/install_plugins.sh" |
||||
# killing the session is not required |
||||
tmux kill-session |
Loading…
Reference in new issue