-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
41 lines (34 loc) · 1.17 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
# Set escape key time to 0
set -s escape-time 0
set-option -g default-command "test -f $(pwd)/.tmuxrc && bash --rcfile $(pwd)/.tmuxrc || bash"
set-option -g allow-rename off
# Change tmux prefix
unbind C-j
set-option -g prefix C-j
bind-key C-j send-prefix
# use vi mode
setw -g mode-keys vi
set -g status-keys vi
bind r source-file ~/.tmux.conf
set -g default-terminal "xterm-256color"
# Manage panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Manage window
bind-key -n M-l next-window
bind-key -n M-h previous-window
# Copy mode selection
bind-key -n M-v copy-mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -n M-p paste-buffer
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b" \; display-message "Copied tmux buffer to clipboard"
# Manage session
bind m split-window "~/.myscripts/ts"
bind-key X if-shell '[ $(tmux list-sessions | wc -l) -ne 1 ]' \
"run-shell 'tmux switch-client -n \\\; kill-session -t \"#S\"'" \
"run-shell 'tmux kill-session -t \"#S\"'"
# Style
set -g status-right ''
set-option -g status-style bg="#088585"