-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
56 lines (43 loc) · 1.63 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
# Zordsdavini <[email protected]> 2019
# use CTRL-A as modifier
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -g default-terminal "st-256color"
# workaround st+tmux+vim crash
set -as terminal-overrides ',st*:Ss@'
# use zsh
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
# Start windows numbering at 1 (instead of 0)
set -g base-index 1
set -g pane-base-index 1
# Enable mouse: scroll and activete panes
# TODO: tmux-yank plugin may cover that part, needs to check
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# bind vi key-mapping
set -g status-keys vi
setw -g mode-keys vi
# Working with unix clipboard (xclip required)
bind C-v run-shell -b "xclip -o | tmux load-bufter - ; tmux paste-buffer"
bind C-c run-shell -b "tmux save-buffer - | xclip -selection c"\; display-message "Buffer copied to clipboard."
# split windows and move to current path on new pane
unbind '"'
bind | split-window -h -c '#{pane_current_path}'
bind _ split-window -v -c '#{pane_current_path}'
# navigate panes with hjkl
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
## STATUS BAR
set -g status-right '#(uptime -p)'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-yank'
run '~/.tmux/plugins/tpm/tpm'