-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtmux.conf
94 lines (73 loc) · 3.07 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
# start tmux in 256-color mode
set -g default-terminal "screen-256color"
# enable mouse mode
# This includes native scrolling, pane- & window-switching, and resizing.
set -g mouse on
# set prefix to ctrl-a from default ctrl-b
# unbind C-b
# set-option -g prefix C-a
# bind-key C-a send-prefix
# Show helpful status messages in tmux status bar
setw -g monitor-activity on
# Start copy mode when scrolling up and exit when scrolling down to bottom.
# The "#{mouse_any_flag}" check just sends scrolls to any program running that
# has mouse support (like vim).
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim, and unite tmux/system clipboards
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
# No delay for escape key press
set -sg escape-time 0
# Smart pane switching with awareness of vim splits. Uses christoomey/vim-tmux-navigator plugin.
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# pane resizing with leader-hjkl. shift makes larger resizes.
bind h resize-pane -L 3
bind j resize-pane -D 3
bind k resize-pane -U 3
bind l resize-pane -R 3
bind H resize-pane -L 10
bind J resize-pane -D 10
bind K resize-pane -U 10
bind L resize-pane -R 10
### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# Renumber windows sequentially after closing any of them.
# Otherwise if you close the second tab of three, you end
# up with tabs numbered 1 and 3.
set -g renumber-windows on
# Stop highlighting window tabs
set-option -g monitor-activity off
set-option -g monitor-silence 0
set-option -g bell-action none