Skip to main content
100%

🍎 macOS-Optimized `.tmux.conf`

βœ“ Published0🌍 Public
IIoTeacher
Last edited Feb 16, 2026
Created on Feb 16, 2026

This tmux configuration provides a stable, macOS-optimized terminal multiplexer setup with a clean, color-coded status bar. It includes Vim-style keybindings for pane navigation and copy mode, mouse support, and true color enabling via `terminal-overrides`. The status bar displays macOS system load data, parsed from the `sysctl -n vm.loadavg` command with `awk`, alongside the current time and hostname. The config also prepares for optional TPM plugin integration through `set -g @plugin` and the `run` command.

AI-generated description

Perfect. Since you're on macOS, I’ll give you a fully macOS-compatible, stable, version-safe tmux config that:

  • βœ… Works on older macOS tmux versions
  • βœ… Avoids unsupported flags (swap-pane -L)
  • βœ… Uses macOS-compatible load display
  • βœ… Keeps everything fast and clean
  • βœ… Works even without Homebrew upgrade
  • βœ… TPM ready (optional)

🍎 macOS-Optimized .tmux.conf

Replace your current file completely with this:

##### ─────────────────────────────────────────────
#####  macOS-Compatible tmux Config
#####  Stable | Fast | Vim-Friendly | Clean UI
##### ─────────────────────────────────────────────


##### ─── PERFORMANCE ────────────────────────────

# Faster key response
set -sg escape-time 10

# Large scrollback
set -g history-limit 50000

# Enable focus events (safe on macOS)
set -g focus-events on

# Enable true color (macOS safe syntax)
set -g default-terminal "screen-256color"
set -as terminal-overrides ",*:Tc"


##### ─── PREFIX KEY ─────────────────────────────

# Change prefix to Ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix

# Reload config
bind r source-file ~/.tmux.conf \; display-message "Config Reloaded βœ”"


##### ─── PANE MANAGEMENT ────────────────────────

# Split panes
bind | split-window -h
bind - split-window -v

# Vim-style navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# Resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5

# Compatible pane swapping (works on older macOS tmux)
bind -r C-h swap-pane -s '{left-of}'
bind -r C-l swap-pane -s '{right-of}'


##### ─── COPY MODE (VIM STYLE) ───────────────────

setw -g mode-keys vi

bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-and-cancel

# macOS clipboard integration
set -g set-clipboard on


##### ─── MOUSE SUPPORT ───────────────────────────

set -g mouse on


##### ─── WINDOW SETTINGS ────────────────────────

set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on


##### ─── STATUS BAR (macOS-safe load display) ───

set -g status-position top
set -g status-interval 5

# Colors
set -g status-style bg=#1e1e2e,fg=#cdd6f4
set -g window-status-style fg=#6c7086,bg=#1e1e2e
set -g window-status-current-style fg=#1e1e2e,bg=#89b4fa,bold

# Left side
set -g status-left-length 40
set -g status-left "#[fg=#89b4fa] #S "

# Right side (macOS compatible uptime parsing)
set -g status-right-length 100
set -g status-right "#[fg=#a6e3a1]#(sysctl -n vm.loadavg | awk '{print $2,$3,$4}') #[fg=#fab387]%H:%M #[fg=#89dceb]#H "

# Pane borders
set -g pane-border-style fg=#6c7086
set -g pane-active-border-style fg=#89b4fa


##### ─── TPM (Optional Plugin Manager) ──────────

# Comment these out if you don't want plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

run '~/.tmux/plugins/tpm/tpm'


##### ─────────────────────────────────────────────
#####  END
##### ─────────────────────────────────────────────

πŸ›  If You Don’t Use TPM

Comment out this entire section:

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run '~/.tmux/plugins/tpm/tpm'

Otherwise install TPM:

brew install tmux   # optional upgrade
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Then inside tmux:

Ctrl-a + I

πŸ”„ Reload It

Inside tmux:

Ctrl-a r

πŸ’‘ macOS Pro Tip

If colors look wrong in iTerm2:

  • Preferences β†’ Profiles β†’ Terminal
  • Set $TERM to:
xterm-256color

Similar vizzes