Skip to content
Sunil Murthy edited this page Apr 11, 2026 · 2 revisions

Tmux Configuration

XDG-compliant tmux configuration with custom key bindings and gruvbox-inspired theme.

Installation

make tmux

Or directly with stow:

cd tmux && stow --no-folding --target=$HOME .

Configuration Location

  • Config: ~/.config/tmux/tmux.conf - Main tmux configuration file

Key Features

  • Custom prefix: ` (backtick) instead of Ctrl-B for easier access
  • Emacs-style key bindings for familiar navigation
  • Mouse support enabled for modern terminal interaction
  • Enhanced colors with gruvbox-inspired theme
  • Increased history limit (50,000 lines)
  • Quick window access with Alt+number shortcuts

Key Bindings

Prefix Key

  • Prefix: ` (backtick) - Much easier to reach than Ctrl-B

Session Management

  • ` d - Detach from session
  • ` s - List and switch sessions
  • ` $ - Rename current session

Window Management

  • ` c - Create new window
  • ` , - Rename current window
  • ` n - Next window
  • ` p - Previous window
  • ` & - Kill current window
  • Alt + 1-9 - Quick switch to window 1-9

Pane Management

  • ` % - Split window vertically
  • ` " - Split window horizontally
  • ` o - Switch to next pane
  • ` x - Kill current pane
  • ` z - Toggle pane zoom

Configuration

  • ` r - Reload tmux configuration
  • ` ? - Show all key bindings

Color Scheme

The configuration uses a gruvbox-inspired color scheme with:

  • Dark background for reduced eye strain
  • High contrast text for readability
  • Subtle accent colors for status information

Mouse Support

Mouse support is enabled for:

  • Pane selection and resizing
  • Window switching
  • Scrolling through history
  • Copy and paste operations

Status Bar

The status bar displays:

  • Current session name
  • Window list with activity indicators
  • System information (time, date)

Tips for Productivity

Session Workflow

# Create a named session for a project
tmux new-session -s myproject

# Detach and reattach later
tmux attach -t myproject

# List all sessions
tmux list-sessions

Window Organization

  • Use descriptive window names: ` , then type name
  • Keep related tasks in the same session
  • Use multiple sessions for different projects

Pane Management

  • Split panes for related tasks (editor + terminal)
  • Use ` z to focus on one pane temporarily
  • Resize panes by dragging with mouse

Integration with Other Tools

Shell Integration

  • Works seamlessly with zsh and bash configurations
  • Preserves shell history across sessions
  • Maintains environment variables

Editor Integration

  • Compatible with Emacs and other terminal editors
  • Proper color support for syntax highlighting
  • Maintains clipboard integration

Troubleshooting

Common Issues

  • Colors not working: Ensure terminal supports 256 colors
  • Mouse not working: Check terminal mouse support settings
  • Key bindings not working: Verify tmux version compatibility

Configuration Reload

After making changes to the configuration:

# Inside tmux session
` r

# Or restart tmux entirely
tmux kill-server && tmux