-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot_tmux.conf
79 lines (63 loc) · 2.08 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
# Requirements:
#
# - reattach-to-user-namespace
# - Set iterm terminal settings to use 'xterm-256color'
# C-a as a prefix; similar to GNU screen
set -g prefix C-a
unbind C-b
# 1-based window indexes
set -g base-index 1
setw -g pane-base-index 1
# Reload .tmux.conf with prefix-r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# prefix-| splits vertically
# prefix-- splits horizontally
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
bind c new-window -c '#{pane_current_path}'
# Moving among panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resizing 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
# pane movement
bind-key D command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key S command-prompt -p "send pane to:" "join-pane -t '%%'"
# Mouse is sometimes useful
set-option -g -q mouse on
# Tmux Powerline
source-file ~/.tmuxline
# let tmux get window name
set-window-option -g automatic-rename on
# Activity in other windows
setw -g monitor-activity on
# vi keys, especially for copy mode
set -g mode-keys emacs
set -g status-keys emacs
unbind p
bind p paste-buffer
bind PageUp copy-mode -eu
if-shell '[[ $(uname -s) = Darwin ]]' {
# OS X copying
# 1) yank: ctr-a y
# 2) move to system clipboard: ctr-a ctr-c
set -g default-command "reattach-to-user-namespace -l zsh"
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer" # bash/zsh
} {
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
}
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'jaclu/tmux-menus'
set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'