-
Notifications
You must be signed in to change notification settings - Fork 9
/
.tmux.conf
98 lines (83 loc) · 3.25 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
# Status bar options
set -g status-right "#(~/.status)"
set -g status-position top
set -g status-style bg=terminal
set -g pane-active-border-style fg=yellow
set -g pane-border-style fg=black
set -g mode-style reverse
# Windows start at 1 and are nameless
set -g base-index 1
set -g renumber-windows on
set -g automatic-rename on
set -g automatic-rename-format ""
# hold alt instead of using ESC
set -g escape-time 0
# less annoying prefix
set -g prefix C-a
bind C-a send-prefix
# touch screen friendly mouse mode
set -g mouse on
bind -n MouseDrag1Border send-keys -M
bind -n WheelUpPane send-keys -M
bind -n WheelDownPane send-keys -M
# these might work better for mouse-unfriendly applications
#bind -n WheelUpPane send-keys Up
#bind -n WheelDownPane send-keys Down
set -g default-command '$SHELL'
# might break stuff
set -g default-terminal 'xterm'
# Navigate 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
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize panes
bind -n M-H resize-pane -L 1
bind -n M-J resize-pane -D 1
bind -n M-K resize-pane -U 1
bind -n M-L resize-pane -R 1
# Selecting windows with M-[0-9]
bind -n M-` last-window
bind -n M-1 if 'tmux select-window -t 1' '' 'new-window -t 1'
bind -n M-2 if 'tmux select-window -t 2' '' 'new-window -t 2'
bind -n M-3 if 'tmux select-window -t 3' '' 'new-window -t 3'
bind -n M-4 if 'tmux select-window -t 4' '' 'new-window -t 4'
bind -n M-5 if 'tmux select-window -t 5' '' 'new-window -t 5'
bind -n M-6 if 'tmux select-window -t 6' '' 'new-window -t 6'
bind -n M-7 if 'tmux select-window -t 7' '' 'new-window -t 7'
bind -n M-8 if 'tmux select-window -t 8' '' 'new-window -t 8'
bind -n M-9 if 'tmux select-window -t 9' '' 'new-window -t 9'
bind -n M-0 if 'tmux select-window -t 10' '' 'new-window -t 10'
# Selecting windows with prefix [0-9]
bind ` last-window
bind 1 if 'tmux select-window -t 1' '' 'new-window -t 1'
bind 2 if 'tmux select-window -t 2' '' 'new-window -t 2'
bind 3 if 'tmux select-window -t 3' '' 'new-window -t 3'
bind 4 if 'tmux select-window -t 4' '' 'new-window -t 4'
bind 5 if 'tmux select-window -t 5' '' 'new-window -t 5'
bind 6 if 'tmux select-window -t 6' '' 'new-window -t 6'
bind 7 if 'tmux select-window -t 7' '' 'new-window -t 7'
bind 8 if 'tmux select-window -t 8' '' 'new-window -t 8'
bind 9 if 'tmux select-window -t 9' '' 'new-window -t 9'
bind 0 if 'tmux select-window -t 10' '' 'new-window -t 10'
# Move panes between windows
bind -n M-! if 'tmux move-pane -t 1' '' 'break-pane -t 1'
bind -n M-@ if 'tmux move-pane -t 2' '' 'break-pane -t 2'
bind -n M-# if 'tmux move-pane -t 3' '' 'break-pane -t 3'
bind -n M-$ if 'tmux move-pane -t 4' '' 'break-pane -t 4'
bind -n M-% if 'tmux move-pane -t 5' '' 'break-pane -t 5'
bind -n M-^ if 'tmux move-pane -t 6' '' 'break-pane -t 6'
bind -n M-& if 'tmux move-pane -t 7' '' 'break-pane -t 7'
bind -n M-* if 'tmux move-pane -t 8' '' 'break-pane -t 8'
bind -n M-( if 'tmux move-pane -t 9' '' 'break-pane -t 9'
bind -n M-) if 'tmux move-pane -t 10' '' 'break-pane -t 10'
bind -n M-E kill-session
bind R source-file ~/.tmux.conf
bind -n M-C source-file ~/.tmux.conf
bind -n M-c run-shell -b "snotify -d"
bind = select-layout even-horizontal
bind + select-layout even-vertical