-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
93 lines (80 loc) · 3.38 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Do not delay the Escape key press.
set -sg escape-time 0
# Retain the nvim cursor.
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
# Enable mouse usage.
setw -g mouse on
# Source this file again.
bind -n C-t source-file $HOME/.tmux.conf \; \
display-message "[SUCCESS]: source $HOME/.tmux.conf"
# Enable terminal titles.
set-option -g set-titles on
# Automatically rename the window according to the program running.
setw -g automatic-rename on
# Renumber windows when a window is closed.
set -g renumber-windows on
# Set the status line at the top.
set-option -g status-position top
set-option -g status-style fg=white,bg=black
set -g status-justify left
set -g status-right ""
set -g status-left ""
# Redraw the status line every {seconds}
set -g status-interval 1
# Set the colorscheme to match the default Gnome Terminal.
setw -g window-status-style 'fg=white bg=black'
setw -g window-status-format '[#I]#[fg=white]#[fg=white]#W#[fg=white] '
setw -g window-status-current-style 'fg=white bg=magenta bold'
setw -g window-status-current-format '[#I]#[fg=red]#[fg=white]#W#[fg=white;] '
# Unbind the default key of copy-mode.
unbind ]
# Switch between windows ("tabs").
bind -n F1 select-window -p
bind -n F2 select-window -n
# Reindex/move windows ("tabs").
bind -n S-F1 swap-window -t '{previous}'
bind -n S-F2 swap-window -t '{next}'
# Use F4 to create a new window -
# all while maintaining the current path.
bind -n F4 new-window -c "#{pane_current_path}"
# Use F3 to split vertically, F7 to split horizontally -
# all while maintaining the current path.
bind -n F3 split-window -h -c "#{pane_current_path}"
bind -n F7 split-window -v -c "#{pane_current_path}"
# F12 to kill the current pane.
bind -n F12 kill-pane
# SWITCH PANES
# Use Alt-arrow keys without prefix to switch panes.
bind -n M-Left select-pane -L
bind -n M-Down select-pane -D
bind -n M-Up select-pane -U
bind -n M-Right select-pane -R
# Use Alt-vim keys without prefix to switch panes.
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# RESIZE PANES
# Use Alt-Control-arrow keys without prefix to resize panes.
bind -n M-C-Left select-pane -L \; resize-pane -L 10 \; select-pane -R
bind -n M-C-Down resize-pane -D 10
bind -n M-C-Up select-pane -U \; resize-pane -U 10 \; select-pane -D
bind -n M-C-Right resize-pane -R 10
# Use Alt-Control-vim keys without prefix to resize panes.
bind -n M-C-h select-pane -L \; resize-pane -L 10 \; select-pane -R
bind -n M-C-j resize-pane -D 10
bind -n M-C-k select-pane -U \; resize-pane -U 10 \; select-pane -D
bind -n M-C-l resize-pane -R 10
# SWAP PANES
# Use Shift-arrow keys without prefix to swap panes, keeping
# the cursor at the selected pane.
bind -n S-Left swap-pane -t '{left-of}' \; select-pane -L \; select-pane -R
bind -n S-Down swap-pane -t '{down-of}' \; select-pane -D \; select-pane -U
bind -n S-Up swap-pane -t '{up-of}' \; select-pane -U \; select-pane -D
bind -n S-Right swap-pane -t '{right-of}' \; select-pane -R \; select-pane -L
# Use Alt-Shift-vim keys without prefix to swap panes, keeping
# the cursor at the selected pane.
bind -n M-H swap-pane -t '{left-of}' \; select-pane -L \; select-pane -R
bind -n M-J swap-pane -t '{down-of}' \; select-pane -D \; select-pane -U
bind -n M-K swap-pane -t '{up-of}' \; select-pane -U \; select-pane -D
bind -n M-L swap-pane -t '{right-of}' \; select-pane -R \; select-pane -L