/
tmux.conf
87 lines (67 loc) · 1.99 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
set-option -g default-terminal screen-256color
set-option -w -g mouse on
# Switch to previous window
bind-key C-b last-window
# Automatically set window title
set-option -w -g automatic-rename on
set-option -g set-titles on
# Automatically renumber windows
set-option -g renumber-windows on
# vi for copy mode
set-option -w -g mode-keys vi
# vi for command status
set-option -g status-keys vi
# split panes
# twm style (spawn a new terminal)
bind-key -n M-enter split-window -h
# vim style
bind-key v split-window -h
bind-key s split-window -v
set-option -s escape-time 0
# Start windows and panes at 1, not 0
set-option -g base-index 1
set-option -w -g pane-base-index 1
# switch windows (twm style)
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
# twm pane switching
bind-key -n M-k select-pane -U
bind-key -n M-j select-pane -D
bind-key -n M-h select-pane -L
bind-key -n M-l select-pane -R
# vim pane switching
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# twm style keys to resize
bind-key -n M-C-k resize-pane -U 1
bind-key -n M-C-j resize-pane -D 1
bind-key -n M-C-h resize-pane -L 1
bind-key -n M-C-l resize-pane -R 1
# vim style keys to resize
bind-key -r - resize-pane -U 1
bind-key -r + resize-pane -D 1
bind-key -r > resize-pane -L 1
bind-key -r < resize-pane -R 1
# kill pane
bind-key -n M-q kill-pane
# vim style move panes
bind-key K swap-pane -U
bind-key J swap-pane -D
bind-key L swap-pane -U
bind-key H swap-pane -D
# fetch pane
bind-key F choose-window "join-pane -s '%%'"
# send pane
bind-key S command-prompt -p "send pane to:" "join-pane -t '%%'"
# reload config file
bind-key r source-file ~/.config/tmux/tmux.conf
set-option -g status-style 'bg=#333333 fg=#5eacd3'