A comprehensive tmux configuration with custom keybindings, popup windows, and enhanced functionality for improved terminal multiplexing experience.
tmux/
βββ tmux.conf # Main tmux configuration file
βββ scripts/
βββ tmux-menu.sh # Interactive session/window selector
βββ tmux-scratch.sh # Scratchpad popup session manager
- Custom Prefix: Changed from
Ctrl-btoCtrl-afor easier access - 256 Color Support: Full color terminal support
- Mouse Support: Click to select panes and resize
- Vim-style Navigation: Vi keybindings for copy mode
- Enhanced History: 50,000 lines of scrollback buffer
| Key Binding | Action |
|---|---|
Prefix + c |
Create new window in current directory |
Prefix + + |
Split window horizontally |
Prefix + - |
Split window vertically |
Prefix + r |
Reload tmux configuration |
| Key Binding | Action |
|---|---|
Prefix + h/j/k/l |
Resize pane left/down/up/right |
Prefix + m |
Maximize/restore pane |
| Key Binding | Action |
|---|---|
v |
Begin selection |
y |
Copy selection |
| Key Binding | Action |
|---|---|
Prefix + w |
Open session/window selector |
Ctrl + t |
Toggle scratchpad popup |
Prefix + g |
Open LazyGit in popup |
- Interactive session and window browser using
fzf - Quick switching between sessions and windows
- Filters out popup sessions for cleaner interface
- Persistent scratchpad session in popup window
- Ideal for quick notes, calculations, or temporary work
- Automatically creates session if it doesn't exist
The configuration uses TPM (Tmux Plugin Manager) with the following plugins:
- vim-tmux-navigator: Seamless navigation between vim and tmux panes
- tmux-resurrect: Save and restore tmux sessions
- tmux-continuum: Automatic session saving every minute
- tmux-yank: Enhanced copy functionality
- tmux-sensible: Sensible default settings
- tmux-themepack: Beautiful themes (using powerline/cyan theme)
Custom status bar configuration with:
- Left: Session name with tmux icon and visual separators
- Right: Time, date, and user@hostname information
- Window indicators: Custom formatting with icons
Ensure you have the following dependencies installed:
tmuxfzf(for interactive menus)lazygit(optional, for git popup)
-
Clone or copy the configuration:
# Create tmux config directory mkdir -p ~/.config/tmux/scripts # Copy configuration files cp tmux/tmux.conf ~/.config/tmux/ cp tmux/scripts/* ~/.config/tmux/scripts/
-
Make scripts executable:
chmod +x ~/.config/tmux/scripts/*.sh
-
Install TPM (if not already installed):
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm -
Start tmux and install plugins:
tmux # Inside tmux, press: Prefix + I (capital i) to install plugins -
Reload configuration:
# Inside tmux, press: Prefix + r
- Start tmux:
tmux - Create new windows:
Prefix + c - Split panes:
Prefix + +(horizontal) orPrefix + -(vertical) - Navigate between sessions:
Prefix + w - Quick scratchpad:
Ctrl + t
- Use
Prefix + wto open the interactive session/window selector - Sessions and windows are displayed in a tree-like structure
- Use arrow keys or vim navigation to select and press Enter
- Press
Ctrl + tto toggle the scratchpad popup - The scratchpad persists across tmux sessions
- Perfect for temporary notes, calculations, or quick commands
Edit tmux.conf and change bindings as needed. Common modifications:
# Change prefix key
set -g prefix C-a
# Add custom binding
bind-key x kill-paneThe configuration uses the powerline cyan theme. To change:
set -g @themepack 'powerline/default/blue' # or other available themesBoth scripts accept environment variables and can be modified:
tmux-menu.sh: Customize fzf options or session filteringtmux-scratch.sh: Change session name or default settings
Scripts not working: Ensure scripts are executable and in the correct path
ls -la ~/.config/tmux/scripts/
chmod +x ~/.config/tmux/scripts/*.shPlugins not loading: Make sure TPM is installed and plugins are installed
# Install TPM
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# In tmux: Prefix + Ifzf not found: Install fzf for menu functionality
# macOS
brew install fzf
# Ubuntu/Debian
sudo apt install fzfThis configuration is provided as-is for personal use. Feel free to modify and distribute.
Feel free to submit issues or pull requests for improvements to this tmux configuration.