A comprehensive tmux configuration featuring a beautiful Catppuccin theme, useful plugins, and vim-style key bindings for efficient terminal management.
- π¨ Catppuccin Macchiato Theme - Beautiful, modern color scheme
- π Plugin Management - Managed via TPM (Tmux Plugin Manager)
- β¨οΈ Vim-style Navigation - Seamless navigation between panes, windows, and vim
- π Status Bar - Shows CPU, battery, uptime, application, and session info
- π±οΈ Mouse Support - Full mouse interaction enabled
- π Enhanced Copy/Paste - Improved clipboard integration with xclip
- π Battery Status - Displays battery information in status bar
- π» CPU Monitoring - Real-time CPU usage display
- πΎ Session Management - Save and restore sessions with tmux-resurrect
- π Session Browser - Advanced session management with fuzzy finding and previews (tmux-sessionx)
- π§Ή Session Cleanup - Clear saved environments with a single command
- π― Process Management - Quick kill processes with tmux-cowboy
- tmux (version 1.9 or higher)
- git
- bash
- xclip (for Linux clipboard support)
- upower or acpi (for battery status on Linux)
- Optional: iostat/sar (for accurate CPU stats)
-
Clone or copy this configuration to
~/.tmux/:git clone <repository> ~/.tmux
-
Create a symlink to your tmux config:
ln -s ~/.tmux/.tmux.conf ~/.tmux.conf
-
Start tmux and install plugins:
tmux # Press Ctrl+B then I (capital I) to install plugins -
Reload configuration (if needed):
tmux source-file ~/.tmux.conf
Prefix Key: Ctrl+B (default)
Ctrl+B |- Split pane horizontallyCtrl+B -- Split pane verticallyCtrl+B h/j/k/l- Navigate panes (vim-style)Alt+h/j/k/l- Navigate panes without prefixAlt+Arrow Keys- Navigate panes without prefixCtrl+B 4/6/8/5- Resize pane (Left/Right/Up/Down)Ctrl+B *- Kill process in current pane (tmux-cowboy)
Ctrl+B c- New windowCtrl+B ,- Rename windowCtrl+B 0-9- Switch to window by numberCtrl+B n- Next windowCtrl+B p- Previous window
Ctrl+B [- Enter copy modev- Begin selectiony- Yank (copy) selection to clipboardr- Toggle rectangle selectiono- Open highlighted text (tmux-open)Ctrl+o- Open highlighted text in editor (tmux-open)
Ctrl+B f- Open session manager with fuzzy finding (tmux-sessionx)Ctrl+B Ctrl+s- Save current tmux environment (tmux-resurrect)Ctrl+B Ctrl+r- Restore last saved environment (tmux-resurrect)Ctrl+B X- Clear all saved environments (tmux-resurrect)
Ctrl+B I- Install/update plugins (TPM)Ctrl+B U- Update plugins (TPM)Ctrl+B Alt+u- Uninstall plugins (TPM)
Ctrl+h/j/k/l- Navigate panes (works seamlessly with vim splits)
The status bar displays:
- Left: Window list with Catppuccin styling
- Right: Application name, CPU usage, session info, uptime, and battery status
This configuration includes the following plugins:
- TPM - Tmux Plugin Manager
- tmux-sensible - Sensible defaults for tmux
- tmux-resurrect - Save and restore tmux sessions
- tmux-continuum - Automatic saving and restoring of tmux sessions
- catppuccin/tmux - Beautiful Catppuccin theme
- tmux-cpu - CPU usage display
- tmux-battery - Battery status display
- tmux-open - Open files/URLs from copy mode
- tmux-cowboy - Quick kill processes
- tmux-sessionx - Advanced session management with fuzzy finding and previews
- vim-tmux-navigator - Seamless vim/tmux navigation
tmux-sessionx provides an advanced session management interface with fuzzy finding and session previews.
Usage:
- Press
Ctrl+Bthenfto open the session manager interface
Features:
- Fuzzy Find Sessions - Quickly search and filter sessions by typing
- Preview Sessions - View session details before switching
- Switch Sessions - Select a session to switch to it
- Delete Sessions - Remove unwanted sessions directly from the interface
- Rename Sessions - Change session names for better organization
Customizing the Key Binding:
To change the default key binding from f to something else, add this to .tmux.conf:
set -g @sessionx-bind 'your_preferred_key'For example, to use Ctrl+B x instead:
set -g @sessionx-bind 'x'Note: The default tmux binding Ctrl+B s already lists sessions, but tmux-sessionx provides a more advanced interface with fuzzy finding and previews.
Save your current tmux environment:
- Press
Ctrl+BthenCtrl+s - Your session state is saved to
~/.tmux/resurrect/(or~/.local/share/tmux/resurrect/)
Restore a saved session:
- Press
Ctrl+BthenCtrl+r - Your last saved environment will be restored
View all saved environments:
ls -lh ~/.tmux/resurrect/
# or
ls -lh ~/.local/share/tmux/resurrect/Each save creates a timestamped file (e.g., tmux_resurrect_20251220T212458.txt). The last symlink points to the most recent save.
Clear all saved environments:
- Press
Ctrl+BthenX(capital X) - This deletes all saved environment files and cleans up related data
Restore a specific previous environment:
- List saved files:
ls ~/.tmux/resurrect/ - Update the
lastsymlink:cd ~/.tmux/resurrect/ && ln -sf tmux_resurrect_YYYYMMDDTHHMMSS.txt last - Restore: Press
Ctrl+BthenCtrl+r
With tmux-continuum installed, your tmux environment is:
- Automatically saved every 15 minutes in the background
- Automatically restored when tmux starts (if enabled)
The automatic restore feature is enabled by default. To disable it, edit .tmux.conf:
set -g @continuum-restore 'off'The theme is set to Catppuccin Macchiato. To change flavors, edit .tmux.conf:
set -g @catppuccin_flavor 'latte' # or 'frappe', 'macchiato', 'mocha'Current window style is "rounded". Options:
basicnoneroundedslanted
Change in .tmux.conf:
set -g @catppuccin_window_status_style "rounded"- Base Index: Windows start at 1 (instead of 0)
- Mouse: Full mouse support enabled
- History: 10,000 lines of scrollback
- Vi Mode: Vi-style key bindings enabled
- Escape Time: 0ms delay for escape key
- Run
tmux source-file ~/.tmux.conf - Press
Ctrl+BthenIto install plugins
- Install
upoweroracpion Linux - Check if battery device is detected:
upower -e
- Install
iostatorsarfor accurate readings - Plugin falls back to
ps auxif unavailable
- Install
xclipon Linux:sudo apt install xclip(Debian/Ubuntu) - On macOS, ensure
pbcopyis available
This configuration uses various plugins with their respective licenses (mostly MIT).