# 0 is too far from ` ;)
set -g base-index 1
setw -g mode-keys vi
#remove escape delay
set -sg escape-time 0
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# kill session
# bind-key k kill-session
# last window ctrl+a
bind-key C-a last-window
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Enable mouse mode (tmux 2.1 and above)
# set -g mouse on
# don't rename windows automatically
# set-option -g allow-rename off
# resize
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r H resize-pane -L 5
bind-key -r L resize-pane -R 5
# switch panes
bind-key j select-pane -D
bind-key k select-pane -U
bind-key h select-pane -L
bind-key l select-pane -R
# pane movement
bind-key a command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
# Reload tmux config
bind r source-file ~/.tmux.conf
# THEME
set -g default-terminal "screen-256color"
set -g status-bg black
set -g status-fg white
set -g window-status-current-bg white
set -g window-status-current-fg black
set -g window-status-current-attr bold
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami)@#H'
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
set -g status-justify centre
set -ga terminal-overrides ',*:sitm@,ritm@'