# The status bar shows traffic for the eth0 network device by default.
# To use a different device, set $NETDEV to it's device name (eg: wlan0).
#
# PRECONFIG
#
# unbind the command prefix and set the new one to ctrl-Space
unbind C-b
set-option -g prefix C-Space
bind Space send-prefix
# SETTINGS
#
# general
set-option -g default-terminal "screen-256color" #set $TERM to screen-256color for compatibility with programs expecting colour
set-option -g renumber-windows on #when a window is closed, renumber the remaining windows
set-option -g set-titles on #attempt to set the terminal title
set-option -g set-titles-string "#I:#P - #W - #T" #string used to set the terminal title
set-option -g history-limit 10000 #maximum number of lines kept in history
set-option -g display-time 2000 #number of ms for status line messages and other on-screen indicators to display
set-option -g display-panes-time 2000 #number of ms to show indicators from the display-panes command
set-option -sg escape-time 0 #allow commands immediately following send-prefix
set-option -sg repeat-time 600 #allow 600ms between repeatable commands
set-window-option -g utf8 on #expect to display utf8 in the window
set-window-option -g aggressive-resize on #only resize a window if a smaller client is actively looking
set-window-option -g monitor-activity on #monitor for activity in windows
set-window-option -g visual-activity off #show the activity being monitored for in the status bar
set-window-option -g xterm-keys on #generate xterm-style function key sequences for better compatibility
set-window-option -g mode-keys vi #use vi-style keys in copy and choice modes
#
# mouse
set-option -g mode-mouse on
set-option -g mouse-utf8 on
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
# KEY BINDINGS
#
# m and ctrl-m to enabling and disabling the mouse respectively
bind m set-option -g mode-mouse on \; set-option -g mouse-resize-pane on \; set-option -g mouse-select-pane on \; set-option -g mouse-select-window on \; display 'Mouse: ON'
bind C-m set-option -g mode-mouse off \; set-option -g mouse-resize-pane off \; set-option -g mouse-select-pane off \; set-option -g mouse-select-window off \; display 'Mouse: OFF'
#
# r and ctrl-r to reloading ~/.tmux.conf and /etc/tmux.conf respectively
bind r source-file ~/.tmux.conf
bind C-r source-file /etc/tmux.conf
#
# \ and ctrl-\ to enabling and disabling the status bar respectively
bind \ set-option -g status on
bind C-\ set-option -g status off
#
# c and ctrl-c to create a new pane in home and at the current path respectively (with repetition)
bind -r c new-window
bind -r C-c new-window -c '#{pane_current_path}'
#
# [ and ] to splitting the window into top/bottom and left/right respectively