-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtmux.conf
135 lines (105 loc) · 3.1 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Config that is very close to a i3 window manager's keybinding + vim.
set-window-option -g mode-keys vi
set -g pane-border-fg white
set -g pane-active-border-fg cyan
set -g status off
set -g status-fg black
set -g status-bg cyan
set -g default-terminal "screen-256color"
set -s escape-time 0
setw -g aggressive-resize on
# Set status bar to the top
# set-option -g status-position top
# First remove *all* keybindings
unbind-key -a
# List keys
bind-key ? list-keys
# Copy mode
bind-key [ copy-mode
# Paste buffer
bind-key ] paste-buffer
# Refresh client
bind-key R refresh-client \; display-message "Refresh already"
# Start with index 1
set -g base-index 1
setw -g pane-base-index 1
# Set new prefix
set -g prefix M-Space
bind-key Space send-prefix
# Clock
setw -g clock-mode-style 24
# Config Reloads
bind c source-file ~/.tmux.conf \; display-message "Config reloaded"
# Mouse on/off
set -g mouse off
# Split window
bind-key \; split-window -h
bind-key v split-window -v
# Rotate Window
bind-key -n M-o rotate-window
# Swap pane
bind-key -r K swap-pane -U
bind-key -r J swap-pane -D
# Move pane with Control (no prefix)
bind-key -n M-h select-pane -L
bind-key -n M-j select-pane -D
bind-key -n M-k select-pane -U
bind-key -n M-l select-pane -R
# Resize pane with Alt (prefix with repeat)
bind-key -r h resize-pane -L 5 \; display-message "Resize left"
bind-key -r j resize-pane -D 5 \; display-message "Resize down"
bind-key -r k resize-pane -U 5 \; display-message "Resize up"
bind-key -r l resize-pane -R 5 \; display-message "Resize right"
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
# Choose Window
bind-key : choose-window
# New Window with number
bind-key 1 new-window -t 1
bind-key 2 new-window -t 2
bind-key 3 new-window -t 3
bind-key 4 new-window -t 4
bind-key 5 new-window -t 5
bind-key 6 new-window -t 6
bind-key 7 new-window -t 7
bind-key 8 new-window -t 8
bind-key 9 new-window -t 9
bind-key 0 new-window -t 10
# Switch windows alt+number
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
bind-key -n M-0 select-window -t 10
# Change current pane to next window
bind-key ! join-pane -t :1
bind-key @ join-pane -t :2
bind-key '#' join-pane -t :3
bind-key '$' join-pane -t :4
bind-key '%' join-pane -t :5
bind-key '^' join-pane -t :6
bind-key '&' join-pane -t :7
bind-key '*' join-pane -t :8
bind-key '(' join-pane -t :9
bind-key ')' join-pane -t :10
# Switch to next windows
bind-key -n M-n select-window -n
# Switch to previous windows
bind-key -n M-p select-window -p
# Switch to next session
bind-key N switch-client -n
# Switch to previous session
bind-key P switch-client -p
# Kill Selected pane
bind-key Q kill-pane
# Detach session
bind-key d detach-client
# Vi-like copy in tmux copy mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection