Using tmux Configuration for Setup

The .tmux.conf file itself can include commands that set up a default environment. If we wanted every tmux session to start in the same default folder, or automatically open a split window, we could bake that right in to our default configuration, simply by using the appropriate commands.

But we can also specify a configuration file when we start up an instance of tmux, by using the -f flag. This way we don’t have to change our original default configuration file, and we can check our configuration file in with our project. We can also set up our own per-project configuration options, such as new keyboard shortcuts.

Let’s try this out by creating a file called app.conf. Inside this file, we can use the same ...

Get tmux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.