set -g default-terminal "tmux-256color"
# Panes start at 1 instead of 0, so that you can switch panes with one hand
set -g base-index 1
setw -g pane-base-index 1
# Allow customizing tab names using bash precmd_functions
set-option -g allow-rename on
# Move between split planes using vi-style keys
bind C-h select-pane -L
bind C-j select-pane -D
bind C-k select-pane -U
bind C-l select-pane -R
# Longer scrollback history
set -g history-limit 50000
# Scroll and copy using vi-style keys
set -g mode-keys vi
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
set -g mouse on
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"