-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
81 lines (61 loc) · 2.23 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
# Now written for tmux 2.9
unbind-key C-b
set -g prefix C-a
set-option -g allow-rename off
# set -g default-terminal "xterm"
# Turn on VI bindings
set-window-option -g mode-keys vi
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# increase scrollback buffer size
set -g history-limit 50000
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# refresh 'status-left' and 'status-right' more often
set -g status-interval 5
# upgrade $TERM
set -g default-terminal "screen-256color"
# emacs key bindings in tmux command prompt (prefix + :) are better than
# vi keys, even for vim users
# set -g status-keys emacs
# focus events enabled for terminals that support them
set -g focus-events on
# super useful when using "grouped sessions" and multi-monitor setup
setw -g aggressive-resize on
# set window and pane index to 1 (0 by default)
set-option -g base-index 1
setw -g pane-base-index 1
# --------------
# Key bindings
# --------------
bind v split-window -h
bind h split-window -v
bind R source-file '/home/ruben/.tmux.conf'
# ----------------------
# Status Bar
# -----------------------
set -g status-style bg=black,fg=white
set -g status-interval 5 # set update frequencey (default 15 seconds)
set -g status-justify centre # center window list for clarity
set -g status-left ''
set -g status-right '#h #[fg=blue]%a %b %d, %Y #[fg=white]%H:%M'
set-window-option -g window-status-current-style bg=green,fg=black
set -g pane-border-style fg=green
set -g pane-active-border-style fg=green
# For vim
set -sg escape-time 0
# Ctrl-Shift Arrow to move around windows
bind-key -n S-Left swap-window -t -1
bind-key -n S-Right swap-window -t +1
# For VI mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# VI mode tmux version 2.3 and below
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# move x clipboard into tmux paste buffer
bind C-p run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
# move tmux copy buffer into system clipboard
bind C-y run "tmux save-buffer - | xclip -sel clip"
# Move tmux copy buffer into x clipboard
# bind C-y run "tmux save-buffer - | xclip -x"