-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
91 lines (67 loc) · 2.72 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
set -g prefix C-a
unbind C-b
bind a send-prefix
set -g default-shell $SHELL
# set -g default-command "reattach-to-user-namespace -l ${SHELL}"
set -g pane-active-border-style bg=default,fg=black
set -g pane-border-style fg=black
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n 'C-\' if-shell "$is_vim" "send-keys 'C-\\'" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
# Bring back clear screen under tmux prefix
bind C-l send-keys 'C-l'
# start numbering windows from 1 instead of zero
set -g base-index 1
# Faster escape sequences (default is 500ms).
# This helps when exiting insert mode in Vim: http://superuser.com/a/252717/65504
set -s escape-time 10
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Have new windows and panes open in the current directory
bind '"' split-window -c '#{pane_current_path}'
bind % split-window -c '#{pane_current_path}' -h
bind c new-window -c '#{pane_current_path}'
bind-key -n C-0 select-window -t :0
bind-key -n C-1 select-window -t :1
bind-key -n C-2 select-window -t :2
bind-key -n C-3 select-window -t :3
bind-key -n C-4 select-window -t :4
bind-key -n C-5 select-window -t :5
bind-key -n C-6 select-window -t :6
bind-key -n C-7 select-window -t :7
bind-key -n C-8 select-window -t :8
bind-key -n C-9 select-window -t :9
bind R source-file ~/.tmux.conf
# set -g status-bg colour234
# set -g status-fg colour254
unbind p
bind p paste-buffer
set-option -g renumber-windows on
setw -g monitor-activity on
set -g visual-activity on
bind Down resize-pane -D 5
bind Up resize-pane -U 5
bind Left resize-pane -L 5
bind Right resize-pane -R 5
set -g set-clipboard on
set -g mouse on
set-option -g status-keys vi
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
##------------------------ THEME
thm_bg="#1e1e2e"
# set -g status-bg "${thm_bg}"