-
Notifications
You must be signed in to change notification settings - Fork 1
/
_tmux.conf
80 lines (63 loc) · 2.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
run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-)"
# Remap C-a to C-b
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# set the prefix to ctrl+a instead of crl+b
set-option -g prefix C-a
# Bind key for the remote tmux C-q
bind-key -n C-q send-prefix
# Set TERM to a colorful option
set -g default-terminal "screen-256color"
# Hit twice ctrl+a takes you to the last window
bind-key C-a last-window
unbind % # remove the default split screen
# use "v" and "s" to do vertical/horizontal splits, like vim
bind s split-window -v
bind v split-window -h
# Use vim motion key while in copy mode
setw -g mode-keys vi
# use the vim motion keys to move between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# use the vim resize keys.
# the number at the end is how much the pane will be resized,
# and 1 is fairly small -- you might want to tweak this.
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
# Change the theme of the status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
set -g status-right '#[fg=yellow]#(uptime | cut -d "," -f2-)'
# Highlight active window
set-window-option -g window-status-current-bg red
# Activity notification
setw -g monitor-activity on
set -g visual-activity on
# Automatically set window title
setw -g automatic-rename
# scrollback size
set -g history-limit 50000
# ESC timeout needs to be tweaked to a low value (10-20ms)
set -g escape-time 11
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.4" | bc)" = 1 ]' \
"bind-key Escape copy-mode; \
bind-key -t vi-copy Escape cancel; \
bind-key -t vi-copy v begin-selection; \
bind-key -t vi-copy V select-line; \
bind-key -t vi-copy y copy-selection; \
bind-key -t vi-copy r rectangle-toggle; \
bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'"
if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.4" | bc)" = 1 ]' \
"bind-key -T copy-mode-vi 'v' send -X begin-selection; \
bind-key -T copy-mode-vi 'V' send -X select-line; \
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle; \
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'"