-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
115 lines (84 loc) · 2.88 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
105
106
107
108
109
110
111
112
113
114
115
# -------------------------------------
# Appearance
# -------------------------------------
# set -g default-terminal "tmux"
set -g default-terminal "tmux-256color"
# Status Bar
set -g status on
set -g status-interval 2
set -g status-justify left
set -g status-left-length 90
set -g status-right-length 120
set -g monitor-activity on
set -g visual-activity on
set -g status-left ' #[fg=colour111]#S#[fg=colour172] #I:#P#[fg=colour189]'
set -g status-right '#[fg=colour111]#H#[fg=colour189] %m/%d/%y %I:%M '
# Window index
set -g base-index 1
set -g pane-base-index 1
# re-number windows when one is closed
set -g renumber-windows on
# -------------------------------------
# Behavior
# -------------------------------------
bind c new-window -c '#{pane_current_path}'
bind % split-window -h -c '#{pane_current_path}'
bind '"' split-window -v -c '#{pane_current_path}'
# Vi Mode
setw -g mode-keys vi
set-option -g status-keys vi
set-option -g default-shell /bin/zsh
# Scrollback Limit
set -g history-limit 5000
# Reduce Command Delay
set -s escape-time 0
# Only shrink window if other client is looking at window
setw -g aggressive-resize on
# -------------------------------------
# Key Bindings
# -------------------------------------
# remap prefix to Control + a
unbind C-b
set -g prefix C-a
# enable ctrl-a forward
bind a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display 'Reloaded!'
# ------- Navigation -------
# intuitive window splitting
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# move around panes like in vim (only in tmux 1.6)
bind h select-pane -L \; display 'select-pane -L'
bind j select-pane -D \; display 'select-pane -D'
bind k select-pane -U \; display 'select-pane -U'
bind l select-pane -R \; display 'select-pane -R'
# move around windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# ------- Resizing --------
# maximize pane to tmp window
unbind Up
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
# restore pane from tmp window
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
# create 25% lower split
unbind t
bind t split-window -p 25 -c '#{pane_current_path}'
# resizing panes
bind -r H resize-pane -L 5 \; display 'resize-pane -L 5'
bind -r J resize-pane -D 5 \; display 'resize-pane -D 5'
bind -r K resize-pane -U 5 \; display 'resize-pane -U 5'
bind -r L resize-pane -R 5 \; display 'resize-pane -R 5'
# ------- Copy mode --------
# copy and paste buffers
bind C-y run 'save-buffer -|xclip'
bind C-p run 'set-buffer "$(xclip -o)"'
# Log output to a text file on-demand
bind P pipe-pane -o 'cat >>~/#W.log' \; display 'Toggled logging to ~/#W.log'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'arcticicestudio/nord-tmux'
run -b '~/.tmux/plugins/tpm/tpm'