-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
54 lines (45 loc) · 1.66 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
#remap prefix to Control + a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left ""
#set -g status-right "#[fg=green]#H"
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# Highlight active window
set-window-option -g window-status-current-style bg=red
# vi-style controls for copy mode
setw -g mode-keys vi
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
#
#bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
#bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
#bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
#bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
#bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# resize panes like vim
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
# mouse options
#set -g mouse-resize-pane on
#set -g mouse-select-window on
#set -g mode-mouse on
#set -g mouse-select-pane on