-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
executable file
·116 lines (89 loc) · 2.98 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
# global
set-window-option -g mode-keys vi
set-option -g prefix C-a
bind-key r source-file ~/.tmux.conf
# helper keys
bind-key S command-prompt -p ssh: "new-window -n %1 'ssh %1'"
# mouse
set -g mouse off
# toggle mouse
bind m \
set -g mouse on \;\
display 'Mouse: ON'
bind M \
set -g mouse off \;\
display 'Mouse: OFF'
# colors
set -g default-terminal "screen-256color"
# pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# tmux/vim integration
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim*$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim*$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim*$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim*$' && tmux send-keys C-l) || tmux select-pane -R"
#tmux pane resize
bind -n C-Left resize-pane -L 5
bind -n C-Right resize-pane -R 5
bind -n C-Up resize-pane -U 5
bind -n C-Down resize-pane -D 5
# Bring back clear screen under tmux prefix
bind C-l send-keys 'C-l'
#using -_ and \| family to open panes
unbind %
unbind '"'
bind-key '|' split-window -h
bind-key '-' split-window -v
bind-key '\' split-window -h
bind-key '_' split-window -v
#kill pane
bind Q kill-pane
bind q confirm-before -p "kill-pane #P? (y/n)" kill-pane
#kill window
bind X kill-window
bind x confirm-before -p "kill-window #W? (y/n)" kill-window
#escape time
set -sg escape-time 0
#activity notifier
setw -g monitor-activity on
set -g visual-activity on
#aggressive resize
setw -g aggressive-resize on
#terminal emualtor window titles
set -g set-titles on
set -g set-titles-string "#T"
#status bars
set -g status-right-length 200
set -g status-left "#H"
set -g status-interval 1
set -g status-right "[#(tmux-mem-cpu-load -i 1)] [%a %Y-%m-%d %H:%M]"
##### COLORS
#default statusbar colors
set -g status-style fg=colour136,bg=colour235,default
# default window title colors
set -g window-status-style fg=colour244,bg=default,default
# active window title colors
set -g window-status-current-style fg=colour166,bg=default,bright
# pane border
set -g pane-border-style fg=default,bg=colour240,default
# message text
set -g message-style fg=colour166,bg=colour235,default
# 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
set-option -g renumber-windows on
#move windows Ctrl + Shift Left or Right
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
#tpm plugins
#https://github.com/tmux-plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
#run this after all the plugins
run -b '~/.tmux/plugins/tpm/tpm'