-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
127 lines (101 loc) · 5.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
# toggle mouse mode to allow mouse copy/paste
# set mouse on with prefix m
bind m \
set -g mouse on \;\
display 'Mouse: ON'
# set mouse off with prefix M
bind M \
set -g mouse off \;\
display 'Mouse: OFF'
set -g mouse on
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-style fg=colour136,bg=colour235
# default window title colors
set-window-option -g window-status-style fg=colour244,bg=default
# active window title colors
set-window-option -g window-status-current-style fg=colour166,bg=default,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,fg=colour166
# 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 green #green
set -g status-interval 1
set -g status-justify left # center align window list
set -g status-left-length 50
set -g status-right-length 150
set -g status-left ' #[fg=white,bg=default,bright]#S#[default]#[fg=gray] » #[fg=green]#H#[default]#[fg=gray] » '
set -g status-right '#{prefix_highlight} #[fg=green,bg=default,bright]#(~/.tmux/plugins/tmux-mem-cpu-load/tmux-mem-cpu-load -a 0)#[default]#[fg=gray] « #[fg=red,bg=default,bright]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",")#[default]#[fg=gray] « #[fg=white,bg=default,bright]%a %I:%M %p#[default]#[fg=gray] « #[fg=green]%Y-%m-%d '
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
# Set parent terminal title to reflect current window in tmux session
set -g set-titles off
#set -g set-titles-string "#I:#W"
# Start index of window/pane with 1, because we're humans, not computers
set -g base-index 1
setw -g pane-base-index 1
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# Vi copypaste mode
set-window-option -g mode-keys vi
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# set to main-horizontal, 60% height for main pane
#bind m set-window-option main-pane-height 60\; select-layout main-horizontal
bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
# auto window rename
set-window-option -g automatic-rename off
set -g renumber-windows on
# color
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',*:sitm=\E[3m'
set -as terminal-overrides ",*:Tc"
# undercurl support
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# support colors for undercurl
set -as terminal-overrides ',*:Setulc=\E[58::2::::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# https://github.com/edkolev/dots/blob/master/tmux.conf
# Updates for tmux 1.9's current pane splitting paths.
# from powerline
run-shell "tmux set-environment -g TMUX_VERSION_MAJOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f1 | sed 's/[^0-9]*//g')"
run-shell "tmux set-environment -g TMUX_VERSION_MINOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f2 | sed 's/[^0-9]*//g')"
# status bar
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 2\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set-option -g status-utf8 on'
# rm mouse mode fail
#if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 1\)' 'set -g mouse off'
#if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 1\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set -g mode-mouse off'
# fix pane_current_path on new window and splits
#if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind c; bind c new-window -c "#{pane_current_path}"'
#if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" "unbind '\"'; bind '\"' split-window -v -c '#{pane_current_path}'"
#if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind v; bind v split-window -h -c "#{pane_current_path}"'
#if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind %; bind % split-window -h -c "#{pane_current_path}"'
# tmux-yank
set -g @yank_selection 'clipboard'
set -g @yank_selection_mouse 'clipboard'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_action 'copy-pipe' # or 'copy-pipe-and-cancel' for the default
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @sidebar-tree-command 'tree -C'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'jaclu/tmux-menus'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-cowboy'
set -g @plugin 'lljbash/tmux-update-display'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'