A customized gpakosz/.tmux setup optimized for macOS with native clipboard integration, vi mode, and screen-like keybindings.
- Prefix:
Ctrl+a(screen-style) - Copy Mode: Full vi bindings with macOS clipboard sync
- Navigation:
Ctrl+a n/pfor windows,hjklfor panes - Mouse: Enabled with auto-copy on selection
- Theme: Powerline-inspired status bar
# Install tmux
brew install tmux
# Required for clipboard integration
brew install reattach-to-user-namespace
# Optional: Nerd Font for icons
brew tap homebrew/cask-fonts
brew install --cask font-meslo-lg-nerd-font# Backup existing config
cp ~/.tmux.conf ~/.tmux.conf.backup 2>/dev/null || true
# Clone Oh My Tmux
git clone --single-branch https://github.com/gpakosz/.tmux.git ~/.tmux
# Create symlinks
ln -s -f ~/.tmux/.tmux.conf ~/.tmux.conf
# Copy and customize local config
cp ~/.tmux/.tmux.conf.local ~/.tmux.conf.localEdit ~/.tmux.conf.local and replace the user customizations section with:
# -- user customizations -------------------------------------------------------
# Increase history
set -g history-limit 10000
# Enable mouse
set -g mouse on
# Vi mode
set -g status-keys vi
setw -g mode-keys vi
# Prefix: Ctrl+a (screen-style)
set -gu prefix2
unbind C-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Window navigation
bind n next-window
bind p previous-window
bind C-n next-window
bind C-p previous-window
bind c new-window
bind , command-prompt -I "#W" "rename-window '%%'"
# Vi copy mode bindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi V send-keys -X select-line
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi Escape send-keys -X cancel
# macOS native clipboard
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Enter copy mode with prefix + v
bind v copy-mode- Font: Settings → Profiles → Text → Font → Select "MesloLGS NF"
- Clipboard: Settings → General → Selection → Check "Applications in terminal may access clipboard"
- Option Key: Settings → Profiles → Keys → Left Option = "Esc+"
- Font: Settings → Profiles → Text → Font → Select "MesloLGS NF"
- Option Key: Settings → Profiles → Keyboard → Check "Use Option as Meta key"
| Action | Shortcut |
|---|---|
| Prefix | Ctrl+a |
| New window | Ctrl+a c |
| Next/previous window | Ctrl+a n / Ctrl+a p |
| Window by number | Ctrl+a 0-9 |
| Split horizontal | Ctrl+a | |
| Split vertical | Ctrl+a - |
| Navigate panes | Ctrl+a h/j/k/l |
| Resize panes | Ctrl+a H/J/K/L |
| Enter copy mode | Ctrl+a [ or Ctrl+a v |
| Start selection | v (in copy mode) |
| Copy | y (in copy mode) |
| Paste | Ctrl+a ] |
| Reload config | Ctrl+a r |
| Edit config | Ctrl+a e |