# remap prefix to Control + a
# esc delay
set -sg escape-time 0

# force reload of config file
unbind r
bind r source-file ~/.tmux.conf

# Splitting windows
unbind %
bind | split-window -h
bind - split-window -v

# Resizing panes
bind -n ^H resize-pane -L 5
bind -n ^L resize-pane -R 5
bind -n ^U resize-pane -U 5
bind -n ^J resize-pane -D 5

# Switching panes
unbind j
unbind k
bind j select-pane -t :.-
bind k select-pane -t :.+
bind ^A select-pane -t :.+

# break pane
# unbind d
# bind d break-pane

# Automatically set window title
set -g default-terminal "xterm-256color"
set-option -g xterm-keys on
set-window-option -g automatic-rename off
set-option -g allow-rename off
#set -g utf8
#set-window-option -g utf8 on

# use vim keybindings in copy mode
setw -g mode-keys vi
set -g status-keys vi
set -g history-limit 10000

# Shift arrow to switch windows
unbind Left
unbind Right
bind Left previous-window
bind Right next-window

# start with window 1 (instead of 0)
set -g base-index 1
set -g pane-base-index 1

# theme
set -g status-bg black
set -g status-fg white
#set -g window-status-current-bg black
#set -g window-status-current-fg blue
#set -g window-status-current-attr bold
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=blue](#S) #(whoami)'
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=red]%H:%M#[default]'
