|  | # edit configuration
 | 
|  | bind e new-window -n '~/.tmux.conf' "sh -c '\${EDITOR:-nvim} ~/.tmux.conf&& tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\"'"
 | 
|  | 
 | 
|  | # reload configuration
 | 
|  | bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
 | 
|  | 
 | 
|  | set-option -g default-terminal "xterm-256color" # colors!
 | 
|  | set-option -ga terminal-overrides ",xterm-256color:Tc"
 | 
|  | setw -g xterm-keys on
 | 
|  | 
 | 
|  | # use C-q for prefix key
 | 
|  | set-option -g prefix C-q
 | 
|  | unbind-key C-a
 | 
|  | bind-key C-q send-prefix
 | 
|  | 
 | 
|  | set -g base-index 1 # start windows numbering at 1
 | 
|  | setw -g pane-base-index 1 # make pane numbering consistent with windows
 | 
|  | 
 | 
|  | setw -g automatic-rename on # rename window to reflect current program
 | 
|  | 
 | 
|  | set -g renumber-windows on # renumber windows when a window is closed
 | 
|  | 
 | 
|  | set -g display-panes-time 800 # slightly longer pane indicators display time
 | 
|  | set -g display-time 1000 # slightly longer status messages display time
 | 
|  | 
 | 
|  | # Allows for faster key repetition
 | 
|  | set -s escape-time 0
 | 
|  | 
 | 
|  | # activity & vi bindings
 | 
|  | set-option -g visual-activity on
 | 
|  | set-window-option -g monitor-activity on
 | 
|  | set-window-option -g mode-keys vi
 | 
|  | set-option -g status-keys vi
 | 
|  | 
 | 
|  | # find session
 | 
|  | bind C-f command-prompt -p find-session 'switch-client -t %%'
 | 
|  | 
 | 
|  | # pane navigation
 | 
|  | bind -r h select-pane -L # move left
 | 
|  | bind -r j select-pane -D # move down
 | 
|  | bind -r k select-pane -U # move up
 | 
|  | bind -r l select-pane -R # move right
 | 
|  | bind C-d swap-pane -D # swap current pane with the next one
 | 
|  | bind C-u swap-pane -U # swap current pane with the previous one
 | 
|  | 
 | 
|  | # pane resizing
 | 
|  | bind -r C-h resize-pane -L 5
 | 
|  | bind -r C-j resize-pane -D 5
 | 
|  | bind -r C-k resize-pane -U 5
 | 
|  | bind -r C-l resize-pane -R 5
 | 
|  | 
 | 
|  | # mouse support
 | 
|  | set -g mouse on
 | 
|  | 
 | 
|  | set -g display-panes-time 3000 # slightly longer pane indicators display time
 | 
|  | set -g display-time 3000 # slightly longer status messages display time
 | 
|  | 
 | 
|  | # use Tab to choose session because s has been used
 | 
|  | bind Tab choose-session
 | 
|  | 
 | 
|  | # use vi-style keys to split vertical and horizonal
 | 
|  | bind v split-window -h -c "#{pane_current_path}"
 | 
|  | bind s split-window -v -c "#{pane_current_path}"
 | 
|  | 
 | 
|  | set-option -g status-bg colour254
 | 
|  | set -g status-interval 1 # redraw status line every second
 | 
|  | 
 | 
|  | set -g pane-border-fg colour245
 | 
|  | set -g pane-active-border-fg colour39
 | 
|  | set -g message-bg colour221
 | 
|  | 
 | 
|  | set -g status-left-length 100
 | 
|  | set -g status-left "#[fg=colour16,bg=colour226] ❐ #S#[fg=colour16,bg=colour226] ➧ #I #W "
 | 
|  | set -g status-justify centre # center align window list
 | 
|  | set -g status-right "#[bg=#99cc66] ☯ %m-%d %H:%M "
 | 
|  | 
 | 
|  | # set window list colors - red for active and blue for inactive
 | 
|  | set-window-option -g window-status-fg brightblue
 | 
|  | set-window-option -g window-status-current-fg brightred
 | 
|  | 
 | 
|  | # Enable locking
 | 
|  | set -g lock-command vlock
 | 
|  | set -g lock-after-time 0 # Seconds; 0 = never
 | 
|  | # bind l lock-client
 | 
|  | bind L lock-client
 |