# tmux config

## Shortcuts

### Reloading conifg
bind R source ~/.tmux.conf \; display ".tmux.conf reloaded"

### Multi-panes synchronization
bind S set synchronize-panes

### Join the last active pane/window to the current window
bind @ join-pane -s !

### More intuitive window splits (use current path)
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %
bind c new-window -c '#{pane_current_path}'

### Pane bindings
bind k selectp -U
bind j selectp -D
bind h selectp -L
bind l selectp -R
bind -r K resizep -U 1
bind -r J resizep -D 1
bind -r H resizep -L 1
bind -r L resizep -R 1

### Copy mode 
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle

## Options

set-option -g base-index 1
set-option -g pane-base-index 1
set-option -g history-limit 50000
set-option -g focus-events on
set-option -g renumber-windows on

set-window-option -g monitor-activity on
set-window-option -g aggressive-resize on

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

## Desgin & look

### statusbar
set -g status-position bottom
set -g status-style 'bg=colour234,fg=colour137,dim'
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20

### messaging
set -g message-style "fg=black,bg=yellow"
set -g message-command-style "fg=blue,bg=black"

### panes
set -g pane-border-style "bg=colour235,fg=colour238"
set -g pane-active-border-style "bg=colour236,fg=colour51"

### window mode
setw -g window-status-current-style "fg=colour81,bg=colour238,bold"
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-style "fg=colour138,bg=colour235,none"
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style "fg=colour255,bg=colour1,bold"

### modes
setw -g clock-mode-colour colour135
setw -g mode-style "fg=colour196,bg=colour238,bold"