-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
89 lines (67 loc) · 2.41 KB
/
dot_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
# use Ctrl-A (rather than Ctrl-B)
set -g prefix C-Space
# go to the last active window
bind-key C-Space last-window
bind-key Tab last-window
# send C-a through to window
bind-key Space copy-mode
# colors
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
run-shell "powerline-daemon -q"
source "${PYTHON_SYSTEM_SITE_PACKAGES}/powerline/bindings/tmux/powerline.conf"
# set title
set -g set-titles on
set -g set-titles-string "tmux: ###S - :#W"
# set the first window index to 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
# extra history (default 2000)
set -g history-limit 50000
# don't delay the ESC character
set -sg escape-time 0
# don't allow zsh to mess with my window names
set-option -g allow-rename off
# This should allow changing the terminal cursor shape
# from: https://github.com/neovim/neovim/wiki/FAQ#cursor-shape-doesnt-change-in-tmux
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q,xterm*:Tc,tmux*:Tc'
# set inactive/active window styles
set -g window-style 'bg=colour0'
set -g window-active-style 'bg=colour8'
# use vim motion keys while in copy mode
setw -g mode-keys vi
# Refresh config
bind-key r source-file ~/.tmux.conf
# 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 motion keys (upper) to resize pane by 1
bind H resize-pane -L
bind J resize-pane -D
bind K resize-pane -U
bind L resize-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 5
bind > resize-pane -R 5
bind - resize-pane -D 5
bind + resize-pane -U 5
# Extra bindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b"
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
bind-key C-x kill-session
set -g focus-events on
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'