set-option -g default-shell /bin/zsh

#set -g utf8
#set-window-option -g utf8 on

set -g default-terminal "screen-256color"

set-option -g set-titles on

set -g prefix ^a
unbind %

set -g base-index 1
set -g pane-base-index 1

set -sg escape-time 1

bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."

bind-key a send-prefix
bind - split-window -v
bind | split-window -h

bind '"' new-window -c "#{pane_current_path}"

setw -g monitor-activity on
set -g visual-activity on

set-option -g automatic-rename on
set-option -g renumber-windows on #movew -r
#set-window-option -g window-status-current-format '#[fg=white,bold]** #{window_index} #[fg=green]#{pane_current_command} #[fg=blue]#(echo "#{pane_current_path}" | rev | cut -d'/' -f-3 | rev) #[fg=white]**|'
#set-window-option -g window-status-format '#[fg=white,bold]#{window_index} #[fg=green]#{pane_current_command} #[fg=blue]#(echo "#{pane_current_path}" | rev | cut -d'/' -f-3 | rev) #[fg=white]|'

bind-key -n C-M-Left previous-window
bind-key -n C-M-Right next-window
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1

# copy and pasting!
# prefix + [ to enter copy mode
# prefix + space to start selecting
# alt + w to copy selected text
# prefix + ] to paste

### prefix - w (list window index)
#bind -r C-Left select-window -t :-
#bind -r C-Right select-window -t :+

set -g mouse on

# status bar
#

#set -g status-bg black
#set -g status-fg white

# status left options
#set-option -g status-left '#[fg=green][#[bg=black,fg=cyan]#S#[fg=green]]'
set-option -g status-left-length 50
set-option -g status-interval 60

# alignment settings
set-option -g status-justify centre

# window list options
set-window-option -g window-status-format '#[fg=cyan,dim]#I#[fg=blue]:#[default]#W#[fg=grey,dim]#F'
set-window-option -g window-status-current-format '#[bg=blue,fg=cyan,bold]#I#[bg=blue,fg=cyan]:#[fg=colour230]#W#[fg=dim]#F'
