Installing the Tmux Plugin Manager (tpm) with Chezmoi

Similar to what I had already shown in a previous post, in this post, I show how you can install (and keep up-to-date) the “tpm” (Tmux Plugin Manager) with Chezmoi, which I highly recommend!

Typically, you manually install “tpm” by cloning its GitHub repository into the proper directory:

Let’s do that automatically with Chezmoi instead.

Chezmoi offers mechanisms for such situations: https://www.chezmoi.io/user-guide/include-files-from-elsewhere/. In particular, I use “Include a subdirectory from a git repository”: this way, Chezmoi will clone the external Git repository on the first run and will keep it up to date (i.e., “git pull”) at some specified intervals (remember, the default interval is 0!).

You need to create the file “.chezmoiexternal.toml” in the root folder of your Chezmoi file and follow the syntax in the documentation.

Here’s what I need to install “tpm” by cloning its GitHub repository:

Note that I specified a 1-hour refresh interval. Thus, if I issue a “chezmoi update”, it will keep that interval into consideration when deciding whether to check for updates (i.e., “pull”) in the Git repository. However, you also have this option in Chezmoi to force the Git update:

That’s all, and enjoy your dotfiles! 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.