-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtmux.conf
104 lines (77 loc) · 2.78 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
# unbind some default keybindings
unbind C-b
# set prefix key to ctrl-a
set -g prefix C-a
# lower command delay
set -sg escape-time 1
# start first window and pane at 1, not zero
set -g base-index 1
set -g pane-base-index 1
# bind r to reloading the config file
bind r source-file ~/.tmux.conf \; display "Reloaded tmux config file."
# pass through a ctrl-a if you press it twice
bind C-a send-prefix
# better mnemonics for splitting panes!
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# keep the current path when creating a new window
bind c new-window -c "#{pane_current_path}"
# vim / xmonad style bindings for pane movement
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# vim / xmonad style bindings for window movement
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# shift-movement keys will resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# disable mouse support (at least while we're learning)
set -g mouse off
# turn on 256 color support in tmux
set -g default-terminal "screen-256color"
# fiddle with colors of status bar
set -g status-style fg=white,bg=colour234
# fiddle with colors of inactive windows
setw -g window-status-style fg=cyan,bg=colour234,dim
# change color of active window
setw -g window-status-current-style fg=white,bg=colour88,bright
# set color of regular and active panes
set -g pane-border-style fg=colour238,bg=default
set -g pane-active-border-style fg=green,bg=default
# set color of command line
set -g message-style fg=white,bg=colour22,bright
# configure contents of status bar
set -g status-left-length 40
set -g status-left "#[fg=green]\"#S\""
set -g status-right "#[fg=green] #h | %d %b %R"
set -g status-justify centre
setw -g monitor-activity on
set -g visual-activity on
# navigate using vim-style keys
setw -g mode-keys vi
# copy/paste using vim-style keys
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -Tcopy-mode-vi v send -X begin-selection
bind -Tcopy-mode-vi y send -X copy-selection
# xclip support (commented as this often doesn't make sense on remote servers)
#bind C-c run "tmux save-buffer - / xclip -i -sel clipboard"
#bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# set up alias for turning on logging
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
# increase length of history buffer
set-option -g history-limit 99999
# unbind arrow keys. This prevents cases where you switch
# to a different pane, then use the arrow key to go through
# command history, and accidentally switch back to the previous
# pane
unbind Up
unbind Down
unbind Left
unbind Right
set-option -g focus-events on