-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
135 lines (105 loc) · 4.2 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat'
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Change default delay
set -s escape-time 1 #Therefore, your Vim will not be delayed.
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "~/.tmux.conf Reloaded!"
#command line
set -g message-style bright
set -g message-style fg=white
set -g message-style bg=black
#vim-like movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
#window
set -g base-index 1
setw -g window-status-style fg=cyan
setw -g window-status-style bg=default
setw -g window-status-style dim
#active window
setw -g window-status-current-style fg=white
setw -g window-status-current-style bg=red
setw -g window-status-current-style bright
#pane
setw -g pane-base-index 1
#set-option -g pane-border-fg green
#set-option -g pane-border-bg black
#set-option -g pane-active-border-fg white
#set-option -g pane-active-border-bg yellow
#active pane
set -g pane-border-style fg=green
set -g pane-border-style bg=black
set -g pane-active-border-style fg=white
set -g pane-active-border-style bg=red
bind | split-window -h #we use what tmux called 'horizontal' split to devide pane vertically.
bind - split-window -v #we use what tmux called 'vertical' split to devide pane horizontally.
#check for activities in other windows
setw -g monitor-activity on
set -g visual-activity on
#resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
set-option -g history-limit 100000
#MacOSX pasteboard workaround, brew install reattach-to-user-namespace
#set-option -g default-command "reattach-to-user-namespace -l zsh"
# Use vim keybindings in copy mode
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
unbind-key -T copy-mode-vi Enter
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T edit-mode-vi Up send-keys -X history-up
bind-key -T edit-mode-vi Down send-keys -X history-down
unbind-key -T copy-mode-vi Space ; bind-key -T copy-mode-vi v send-keys -X begin-selection
unbind-key -T copy-mode-vi Enter ; bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
unbind-key -T copy-mode-vi C-v ; bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
unbind-key -T copy-mode-vi [ ; bind-key -T copy-mode-vi [ send-keys -X begin-selection
unbind-key -T copy-mode-vi ] ; bind-key -T copy-mode-vi ] send-keys -X copy-selection
#
# # Bind ']' to use pbpaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
#status bar
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.2" | bc)" = 1 ]' \
"set -g utf8 on; set -g status-utf8 on; set -g mouse-utf8 on"
#set -g status-fg white
#set -g status-bg black
set -g status-left-length 40
set -g status-left "session: #[fg=green]#S #[fg=yellow]#I #[fg=yellow]#P"
set -g status-right "#[fg=cyan]%d %b %Y %R"
set -g status-justify centre
### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-style bg=colour235 #base02
set-option -g status-style fg=colour136 #yellow
set-option -g status-style default
# default window title colors
set-window-option -g window-status-style fg=colour244 #base0
set-window-option -g window-status-style dim
# active window title colors
set-window-option -g window-status-current-style fg=colour166 #orange
set-window-option -g window-status-current-style bg=default
set-window-option -g window-status-current-style bright
# pane border
set-option -g pane-border-style fg=colour235 #base02
set-option -g pane-active-border-style fg=colour240 #base01
# message text
set-option -g message-style bg=colour235 #base02
set-option -g message-style 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
# Try full width window
set-window-option -g aggressive-resize on
run '~/.tmux/plugins/tpm/tpm'