Are you still using tmux with its default, boring setup? If so, you’re missing out on a beautiful, functional, and fast tmux experience!
In this guide, I’ll show you how to customize tmux in just 15 lines of configuration, and importantly, without any plugins!
By the end, your tmux will look and feel amazing, with a better status bar, clear pane borders, and instant responsiveness. Best of all? It takes less than 10 minutes to set up!
What is tmux & Why Should You Use It?
Before we dive into customization, let’s quickly cover what tmux is and why it’s a must have tool for developers, sysadmins, and power users.
tmux is a Terminal Multiplexer that allows you to:
- Split your terminal into multiple panes and windows
- Detach and reattach sessions, keeping your work running
- Boost productivity when working with SSH or local terminals
If you’ve ever lost an SSH session and had to restart everything tmux solves that problem!
Step 1: Create Your tmux Config File
To start customizing tmux, open (or create) your ~/.tmux.conf file:
vim ~/.tmux.conf
Now, let’s add some powerful tweaks that will transform your tmux experience!
Step 2: Enable Instant Config Reloading
First, let’s make it easier to apply changes on the fly. Add this line:
bind r source-file ~/.tmux.conf # Reload config
Now, whenever you update your config, just press Prefix + r, and your changes will apply instantly!
Step 3: Speed Up tmux Response Time
By default, tmux has a slight delay when processing key combinations. Let’s remove the lag by setting escape-time to 0:
set -sg escape-time 0
Now, pane switching and key combos feel much snappier!
Step 4: Improve the Status Bar
A great status bar makes tmux more readable and visually appealing. Let’s apply a Gruvbox-inspired color scheme:
set -g status-bg colour237 # Dark gray background
set -g status-fg colour214 # Bright yellow text
What this does:
- Creates a dark, sleek status bar
- Uses bright yellow text for better visibility
Show Useful Information in the Status Bar
Now, let’s customize what the status bar displays:
set -g status-left '#[fg=colour237]#{?client_prefix,#[fg=colour214],} *' # Show prefix key indicator
set -ga status-left '#[bg=colour237,fg=colour214] #S ' # Display session name set -g status-right ' #[fg=colour244]%Y-%m-%d %H:%M ' # Show current date and time
set -ga status-right '#[bg=colour214,fg=colour237] #(whoami) ' # Show current user
Now, your status bar shows the session name in the left, and current user, and date/time in the right, producing a clean layout!
Step 5: Improve Pane Borders
By default, it’s hard to see which tmux pane is active. Let’s fix that!
set -g pane-border-style fg=colour239 # Darker gray for inactive panes
set -g pane-active-border-style fg=colour214 # Bright yellow for active panes
Now, inactive panes fade into the background while the active pane pops out with a bright border!
Step 6: Improve Open Windows Display
Now, let’s clean up how tmux displays your open windows! By default, it’s not always easy to tell which window is active and which ones are inactive, so let’s fix that!
# Format for inactive windows: window ID (I) and window name (W)
setw -g window-status-format ' #[fg=colour244]#I #[fg=colour250]#W '
# For active window
setw -g window-status-current-format '#[bg=colour214,fg=colour237]#I #W'
With this simple tweak, inactive windows will display their ID and name in gray tones, while the active window will pop with a bright background, making it instantly recognizable.
This makes navigating between windows much smoother and more intuitive.
Step 7: Add NerdFonts Icons for a Stylish Look
Want to make tmux look even better? Let’s add some icons using NerdFonts!
1. Install a NerdFont
Download one from nerdfonts.com and set it as your terminal font.
2. Add Icons to the tmux Window List
Now, let’s add cool icons to your window list:
setw -g window-status-current-format '#[bg=colour237,fg=colour214]' # Left rounded icon
setw -ga window-status-current-format '#[bg=colour214,fg=colour237]#I' # Window ID
setw -ga window-status-current-format '#{?window_zoomed_flag, ,}' # Zoom icon
setw -ga window-status-current-format ' #W' # Window name
setw -ga window-status-current-format '#[bg=colour237,fg=colour214]' # Right rounded icon
Now, your window list has cool rounded edges and zoom indicators!
Final Result – A Stunning tmux Setup!
With these 16 lines of configuration, your tmux setup now:
- Loads changes instantly (
Prefix + r) - Feels faster with zero delay
- Has a sleek, readable status bar
- Highlights the active pane for better visibility
- Displays icons for a polished look
And the best part? No plugins needed!
Want More Terminal Customization?
If you enjoyed this guide, and want to see this tmux configuration in action, check out my full video tutorial on YouTube!
Got a cool tmux trick? Drop a comment below!
Happy coding with your new supercharged tmux!
Full config file
$ cat ~/.tmux.conf
bind r source-file ~/.tmux.conf # Reload config
set -sg escape-time 0
set -g status-bg colour237 # Dark gray background
set -g status-fg colour214 # Bright yellow text
# Left status configuration
set -g status-left-length 100 # Allow for long session names in the left status
set -g status-left '#[fg=colour237]#{?client_prefix,#[fg=colour214],} ●' # Show prefix key indicator
set -ga status-left '#[bg=colour237,fg=colour214] #S ' # Display session name
# Right status configuration
set -g status-right '#[fg=colour244] %Y-%m-%d %H:%M ' # Show current date and time
set -ga status-right '#[bg=colour214,fg=colour237] #(whoami) ' # Show current user
# Split borders configuration
set -g pane-border-style fg=colour239 # Darker gray for inactive panes
set -g pane-active-border-style fg=colour214 # Bright yellow for active panes
# Window list styling configuration
# Format for inactive windows: window ID (I) and window name (W)
setw -g window-status-format ' #[fg=colour244]#I #[fg=colour250]#W '
# For active window
setw -g window-status-current-format '#[bg=colour237,fg=colour214]' # Left rounded icon
setw -ga window-status-current-format '#[bg=colour214,fg=colour237]#I' # Window ID
setw -ga window-status-current-format '#{?window_zoomed_flag, ,}' # Zoom icon
setw -ga window-status-current-format ' #W' # Window name
setw -ga window-status-current-format '#[bg=colour237,fg=colour214]' # Right rounded icon