# setw == set-window-option
# set -s server option
# set -g global option
# bind == bind-key
# add manpage highlight
set -g default-terminal "screen-it"
set -g prefix C-s
# get out of delay time
set -sg escape-time 1
# repeat-time
set -g repeat-time 1000
# let window/pane begin at 1
set -g base-index 1
set -g pane-base-index 1
setw -g mode-keys vi
# status-bar
set -g status-utf8 on
set -g status-left-length 40
set -g status-left "#[fg=black]Session: #S #[fg=blue]#I #[fg=red]#P"
set -g status-right "#[fg=black]%d %b %R"
set -g status-justify centre
# mouse
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
# keybinds
unbind C-b
bind C-s send-prefix
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind x last-window
# panes
bind | split-window -h
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
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
bind z kill-pane
# copy and paste
bind Escape copy-mode
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
# toggle log pane
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"