-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
73 lines (65 loc) · 2.35 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
# So I can use "tmux attach" even if tmux isn't running.
# This interferes with "tmx" wrapper script.
#new -s work
set -g visual-bell off
set -g bell-action any
set-window-option -g aggressive-resize on
# Make Esc work in Vim, etc.
set -g escape-time 50
set -g set-titles on
set -g set-titles-string "#{host_short} #{session_name}"
set -ga terminal-overrides ',xterm*:hs,tsl=\e]0;,fsl=^G,TS=\e]0;'
# Ctrl+Space (or anything that sends ^@) is Prefix
unbind C-Space
set -g prefix C-Space
bind C-Space send-prefix
# Alt+number switches to that window
bind -n M-0 select-window -t :=0
bind -n M-1 select-window -t :=1
bind -n M-2 select-window -t :=2
bind -n M-3 select-window -t :=3
bind -n M-4 select-window -t :=4
bind -n M-5 select-window -t :=5
bind -n M-6 select-window -t :=6
bind -n M-7 select-window -t :=7
bind -n M-8 select-window -t :=8
bind -n M-9 select-window -t :=9
# Alt+PgUp/PgDown goes to next/previous window
bind -n M-NPage next-window
bind -n M-PPage previous-window
# Ctrl+PgUp/PgDown goes to next/previous window
bind -n C-NPage next-window
bind -n C-PPage previous-window
# Alt+arrow goes to the pane in that direction
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
# Ctrl+arrow goes to the pane in that direction
bind -n C-Left select-pane -L
bind -n C-Down select-pane -D
bind -n C-Up select-pane -U
bind -n C-Right select-pane -R
# Prefix+arrow goes to the pane in that direction
bind Left select-pane -L
bind Down select-pane -D
bind Up select-pane -U
bind Right select-pane -R
# Prefix+Vi direction letter goes to the pane in that direction
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind R source-file ~/.tmux.conf
# Start a regular shell, not a login shell.
set -g default-command "${SHELL}"
set -g status-left ""
set -g status-justify left
set -g status-style fg=default,bg=default,reverse
set -g window-status-current-format "#[noreverse][#I: #W]#[reverse]"
set -g window-status-format "#I: #W"
set -g status-right "tmux #S on #h %H:%M %Z"
# Make Page Up scroll up in the shell and send Page Up in less, vim, etc.
# Since the only way to scroll in the shell inside tmux is to use copy-mode,
# -e makes copy-mode exit when I Page Down back to the bottom.
bind -n PageUp if-shell -F "#{alternate_on}" "send-keys PageUp" "copy-mode -e; send-keys PageUp"