Skip to main content
ertius.org

git games

I was quite pleased with this little change that I made to my dotfiles:

index f37bc16..5eb8cfb 100644
--- a/base/.tmux.conf
+++ b/base/.tmux.conf
@@ -4,17 +4,15 @@ bind r source-file ~/.tmux.conf

+
+# List of plugins
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-sensible'
+set -g @plugin 'o0th/tmux-nova'
+
+run '~/.tmux/plugins/tpm/tpm'

I've started using tpm, the tmux plugin manager. It requires a checkout of the plugin manager repo itself, and that needs to always be there, so I add it as a git submodule (with git submodule add https://github.com/tmux-plugins/tpm base/.tmux/plugins/tpm). One of the steps for using the repo on a new machine is to init and update all the submodules, so that gets the manager done. tpm will then checks out random other git repositories in to ~/.tmux/plugins/ as specified in tmux.conf lines like this:

set -g @plugin 'tmux-plugins/tmux-sensible'

I don't (yet?) care very much about fixed versions for them, so I can just add a .gitignore to base/.tmux/plugins like this:

# Ignore everything, by default
*

to ignore all other things that are checked out here. git won't want to add the .gitignore once I've done that, so it'll need a git add -f base/.tmux/plugins/.gitignore.