Book Image

Getting Started with tmux

By : Victor Quinn
Book Image

Getting Started with tmux

By: Victor Quinn

Overview of this book

Table of Contents (16 chapters)
Getting Started with tmux
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

The configuration reference


What follows is the configuration file that we built over the course of Chapter 2, Configuring tmux:

# Enable mouse mode for mouse scrolling (tmux 1.9a+)
set-window-option –g mouse-mode on
# Enable mouse for selecting the window by clicking on the title
# in the status bar
set-option -g mouse-select-window on
# Enable mouse for selecting the pane by clicking on it
set-option -g mouse-select-pane on
# Enable the mouse for clicking and dragging to resize panes
set-option -g mouse-resize-pane on

# Set the status bar background to blue
set-option -g status-bg blue
# Set the status bar text to white
set-option -g status-fg white

# Widen the status-left a bit to fit more
set-option -g status-left-length 25
# Change status-left to be {username@host}
set-option -g status-left "{#(whoami)@#H}"

# Set the active window background in the status bar
set-window-option –g window-status-current-bg magenta

# Rebind the prefix key
set-option -g prefix C-t

# Add a key binding for reloading our configuration
bind-key C-r source-file ~/.tmux.conf
# Double tapping the prefix jumps to last window
bind-key C-t last-window

# Set escape time to not break vim
set-option -s escape-time 0

# Set the base-index to 1 rather than 0
set-option -g base-index 1
set-window-option -g pane-base-index 1

# Extend the display time to 2 seconds
set-option –g display-time 2000

# Store more history in the buffer than default
set-option –g history-limit 10000