# # # # # # # # # # # # # # # # # # # # # # # # #
# Derived and adapted from Brian P. Hogan's book  #
# tmux: Productive Mouse-Free Development         #
# http://pragprog.com/book/bhtmux/tmux            #
# # # # # # # # # # # # # # # # # # # # # # # # # #

# Setting the prefix from C-b to C-a
set -g prefix C-a
 
# Free the original Ctrl-b prefix keybinding
unbind C-b   
 
#setting the delay between prefix and command
set -s escape-time 1
 
# Ensure that we can send Ctrl-A to other apps
bind C-a send-prefix
 
# Set the base index for windows to 1 instead of 0
set -g base-index 1
 
# Set the base index for panes to 1 instead of 0
setw -g pane-base-index 1
 
# Reload the file with Prefix r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
 
# splitting panes
bind | split-window -h
bind - split-window -v
 
# moving between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
 
# Quick pane selection
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
 
# Pane resizing
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
 
# mouse support - set to on if you want to use the mouse
 
# Set the default terminal mode to 256color mode
set -g default-terminal "screen-256color"
 
# enable vi keys.
setw -g mode-keys vi
bind-key -T copy-mode-vi y send-keys -X copy-selection \; send-keys -X cancel
 
# Log output to a text file on demand
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"

set -g pane-border-style fg=white,bg=black
set -g pane-active-border-style fg=magenta,bg=black

set -g status off
