| 1 | set -g default-terminal "xterm-256color" |
| 2 | set-option -ga terminal-overrides ",xterm-256color:Tc" |
| 3 | set -ga terminal-overrides ",xterm-256color:Tc" |
| 4 | set -g extended-keys on |
| 5 | set -g extended-keys-format csi-u |
| 6 | |
| 7 | # action key |
| 8 | unbind C-b |
| 9 | set -g prefix C-q |
| 10 | set-option -g repeat-time 0 |
| 11 | |
| 12 | set -g @tpm-clean 'u' |
| 13 | bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt |
| 14 | set -g detach-on-destroy off # don't exit from tmux when closing a session |
| 15 | |
| 16 | # Plugins |
| 17 | set -g @tpm_plugins ' |
| 18 | tmux-plugins/tpm |
| 19 | tmux-plugins/tmux-sensible |
| 20 | tmux-plugins/tmux-resurrect |
| 21 | christoomey/vim-tmux-navigator |
| 22 | ' |
| 23 | bind-key "T" display-popup -B -h 100% -w 100% -E "sesh picker -Hds" |
| 24 | |
| 25 | bind-key b set-option status |
| 26 | |
| 27 | set-window-option -g mode-keys vi |
| 28 | |
| 29 | # turn on mouse |
| 30 | set -g mouse on |
| 31 | |
| 32 | #bind t send-key C-t |
| 33 | # Reload settings |
| 34 | bind r source-file ~/.tmux.conf \; display "Reloaded!" |
| 35 | # Open current directory |
| 36 | bind o run-shell "open #{pane_current_path}" |
| 37 | bind -r e kill-pane -a |
| 38 | |
| 39 | # vim-like pane switching |
| 40 | bind -r k select-pane -U |
| 41 | bind -r j select-pane -D |
| 42 | bind -r h select-pane -L |
| 43 | bind -r l select-pane -R |
| 44 | |
| 45 | # Moving window |
| 46 | bind-key -n C-S-Left swap-window -t -1 \; previous-window |
| 47 | bind-key -n C-S-Right swap-window -t +1 \; next-window |
| 48 | |
| 49 | # Resizing pane |
| 50 | bind -r K resize-pane -U 5 |
| 51 | bind -r J resize-pane -D 5 |
| 52 | bind -r H resize-pane -L 5 |
| 53 | bind -r L resize-pane -R 5 |
| 54 | |
| 55 | # Start windows and panes at 1, not 0 |
| 56 | set -g base-index 1 |
| 57 | set -g pane-base-index 1 |
| 58 | set-window-option -g pane-base-index 1 |
| 59 | set-option -g renumber-windows on |
| 60 | |
| 61 | # Opens split panes in current path |
| 62 | bind '"' split-window -v -c "#{pan_current_path}" |
| 63 | bind % split-window -h -c "#{pane_current_path}" |
| 64 | |
| 65 | |
| 66 | #set-option utf8-default on |
| 67 | #set-option -g mouse-select-pane |
| 68 | set-window-option -g mode-keys vi |
| 69 | #set-window-option -g utf8 on |
| 70 | # look'n feel |
| 71 | set-option -g status-position "top" |
| 72 | set-option -g status-style bg=default,fg=default |
| 73 | set-option -g status-justify centre |
| 74 | set-option -g status-left '#[bg=default,fg=default,bold]#{?client_prefix,, }#[bg=default,fg=colour3,bold]#{?client_prefix, ,}' |
| 75 | set-option -g status-right '#S' |
| 76 | set-option -g window-status-format '#[bg=default,fg=colour2] #W ' |
| 77 | set-option -g window-status-current-format '#[bg=default,fg=colour3] #W#{?window_zoomed_flag, , }' |
| 78 | |
| 79 | |
| 80 | run '~/.tmux/plugins/tpm/tpm' |