-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
60 lines (60 loc) · 2.11 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# General
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# reload configuration
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
# prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Display
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
# Navigation
# split
unbind '"'
bind - split-window -v -c '#{pane_current_path}' # split current window horizontally
unbind %
bind = split-window -h -c '#{pane_current_path}' # split current window vertically
# move
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
# swap
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# resize
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# window
unbind n
unbind p
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
# maximize current pane
bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D'
# Mouse
set -g mouse on
# Copy Mode
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X select-line
bind-key -T copy-mode-vi Escape send -X cancel
# copy to macOS clipboard
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
# Status Bar
set-option -g status-position bottom
set-option -g status-interval 5
set-option -g visual-activity on
set-window-option -g monitor-activity on
set -g status-fg white
set -g status-bg black
set -g status-left ""
setw -g window-status-format "#[fg=colour172]#I#[fg=white] #W "