-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
74 lines (59 loc) · 2.66 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
# Screen keybindings
source ~/.tmux/tmux-screen-keys.conf
# byobu keybindings
source ~/.tmux/byobu-keys.conf
setw -g xterm-keys on
# General settings
unbind -n C-a # clear Ctrl-a
set -g prefix ^B # set prefix
set -g prefix2 ^B # set prefix2
bind a send-prefix # prefix + a sends prefix to terminal
set -s escape-time 0 # time to wait after escape is input
set -g history-limit 10000 # Set max number of lines held in window history
setw -g mode-keys vi # Act like Vi in copy and choice mode
set -g default-terminal "tmux" # 256 colors
setw -g mouse on # Should tmux capture mouse events
setw -g monitor-activity on # Monitor for activity in the window
bind r source-file ~/.tmux.conf \; display "Reloaded!" # reload ~/.tmux.conf using PREFIX r
bind p run "xsel -o | tmux load-buffer - ; tmux paste-buffer" # move x clipboard into tmux paste buffer
#
# Navigation
# 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 -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
# Use alt hjlk as alt-arrows
bind -n M-h previous-window
bind -n M-l next-window
bind -n M-k switch-client -p
bind -n M-j switch-client -n
bind -n M-i choose-tree -s
bind -n M-o switch-client -l
#
# Themes
set -g display-time 2000
set -g display-panes-colour black
set -g display-panes-active-colour green
set -g status-style 'fg=white bg=black none'
set -g message-style 'fg=black bg=white bold'
set -g pane-active-border-style 'fg=green bg=default none'
set -g pane-border-style 'fg=black bg=default none'
setw -g window-status-style 'fg=default bg=default none'
setw -g window-status-current-style 'fg=white bg=blue bold'
# status line
set -g status-interval 1
set -g status-left-length 256
set -g status-right-length 256
set -g status-left '#(~/.tmux/status.sh left)'
set -g status-right '#(~/.tmux/status.sh right)'
source ~/.tmux/tpm.conf
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'