Screen Too Small

This course material requires a larger screen to properly display the terminal and editor interfaces.

Please use a tablet, laptop, or desktop computer for the best learning experience.

You can continue browsing, but the experience will be significantly limited.

5/9
Free Trial: 3 lessons remaining
Unlock Full Access

I make this look good!

Estimated time: 5 minutes

So we've taken Tmux and made it feel closer to navigating Vim. We've dropped in some ability to reload our config easily and even updated our leader key.

But something feels wrong.

As a self-respecting Catppuccin lover, this cannot stand.

To clean this up though, we're going to bring in some other tools. Specifically, TPM – also known as the Tmux Plugin Manager.

Installation of TPM

Now if you're Tmux, let's just open a horizontal pane to do what's needed.

<leader>+ " will create that horizontal pane for you. Now if you paste this command, you'll get what you need

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Install script

Now that it's in play, you can open up your .tmux.conf file and edit it to include some key lines for TPM.

# List of plugins
set -g @plugin 'tmux-plugins/tpm'

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

Configuration for TPM

Once you've added these lines, you can reload the configuration with <leader>+r. After that's done, you can install using the plugins with <leader> + I.

These plugins get installed in /.tmux/plugins into their own individual folder.

With this done, we can get to styling things to look their best.

And by best, I mean Catppuccin (https://github.com/catppuccin/tmux).

If you go here, you can review some of the docs but the key thing to do is to install it. We do this by adding a simple line to our .tmux.conf file.

set -g @plugin 'catppuccin/tmux'

Adding Catppuccin !

Once that's added, you'll need to :w the file, reload tmux configuration with (<leader> + r), and then install the plugins again. That is (<leader> + I).

The plugin should get installed and then all of a sudden, you'll see a better looking status bar at the bottom.

At first blush this might look good but it's very crowded with the status bar among other things. Thankfully, we can move the status bar to the top. Let's do that next.

set-option -g status-position top

Move tmux status bar to the top

Now there's more theming that can be done and there is one that we like out of the box and that is Config 3. You can copy this entire section and drop it right underneath the catppuccin/tmux plugin.

set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_number_position "right"

set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"

set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"

set -g @catppuccin_status_modules_right "directory session"
set -g @catppuccin_status_left_separator  " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"

set -g @catppuccin_directory_text "#{pane_current_path}"

Now above, I've removed the a couple of the status_modules_right and only left directory and session. These are the ones that are most meaningful/useful to me but you can keep what you want.

Now you're looking good.

But we're not done yet. Let's get Tmux and Neovim to play together like old friends.

You've completed this lesson!

You completed this lesson less than a minute ago.