-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
178 lines (141 loc) · 7.21 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
## Tmux settings
## https://github.com/rothgar/awesome-tmux
# Set XTerm key bindings
setw -g xterm-keys on
# Set colors
set-option -g default-terminal "screen-256color"
set -g default-terminal "screen-256color"
set-option -sa terminal-features ',xterm-256color:RGB'
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# # toggle hide statusbar with
# # bind-key -n C-h set-option -g status
# # bind-key -n C-h set-option -g status
# bind C-h set-option -g status
# # Configure clock
# setw -g clock-mode-colour colour031
# setw -g clock-mode-style 24
# # bind-key C-k send-keys -R \; clear-history
# # set time show number select-pane
# set -g display-panes-time 4000
# # display-panes
# set display-panes-colour colour013
# set display-panes-active-colour colour093
#
# # Configure escape vim for Neovim.
# # https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed
# set-option -sg escape-time 10
#
# Set reload key to r
bind r source-file ~/.tmux.conf
#
# Count sessions start at 1
set -g base-index 1
#
# # Use vim bindings
# setw -g mode-keys vi
# Enable mouse in tmux. Note that this will interfere with mouse selection.
# In iterm2, hold down opt to enable normal mouse selection while mouse mode
# is on in tmux.
set -g mouse on
# Remap window navigation to vim
unbind-key n
# bind-key n select-pane -D
unbind-key e
# bind-key e select-pane -U
unbind-key y
# bind-key y select-pane -L
unbind-key o
# bind-key o select-pane -R
# # Resize the current pane using Alt + direction
# # bind -n M-5 resize-pane -U
# # bind -n M-4 resize-pane -D
# # bind -n M-^ resize-pane -L
# # bind -n M-6 resize-pane -R
#
#
# # # Open new panes and windows in current directory.
# # bind '%' split-window -h -c '#{pane_current_path}'
# # bind '"' split-window -v -c '#{pane_current_path}'
# # bind c new-window -c '#{pane_current_path}'
###########################################################################################
## List of plugins
# https://github.com/tmux-plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
# https://github.com/tmux-plugins/tmux-sensible
set -g @plugin 'tmux-plugins/tmux-sensible'
# https://github.com/tmux-plugins/tmux-pain-control
set -g @plugin 'tmux-plugins/tmux-pain-control'
# quick opening of a highlighted file or url
set -g @plugin 'tmux-plugins/tmux-open'
# enhances tmux search
# WARN: tmux-copycat make vim yank not work, use enter to copy, `prefix + /`
set -g @plugin 'tmux-plugins/tmux-copycat'
# https://github.com/tmux-plugins/tmux-resurrect
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
# # set -g @continuum-boot-options 'fullscreen'
# set -g @continuum-boot-options 'iterm'
# # set -g @continuum-boot-options 'iterm,fullscreen'
# setup vim keybindings for copy mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi V send -X select-line
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# Tmux statusbar config (created by tmuxline.vim)
set -g status-justify "left"
set -g status "on"
set -g status-style "none"
set -g message-command-style "bg=colour31"
set -g status-left-length "100"
set -g pane-active-border-style "fg=colour254"
# set -g status-bg "colour234" ## status bar background
set -g message-command-style "fg=colour231"
set -g pane-border-style "fg=colour240"
set -g message-style "bg=colour31"
set -g status-left-style "none"
set -g status-right-style "none"
set -g status-right-length "100"
set -g message-style "fg=colour231"
setw -g window-status-style "fg=colour250,bg=default,none"
setw -g window-status-activity-style "fg=colour250,bg=default,none"
setw -g window-status-separator ""
set -g status-left "#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=default,nobold,nounderscore,noitalics]"
# set -g status-right "#[fg=colour236,bg=colour234,nobold,nounderscore,noitalics]#[fg=colour247,bg=colour236] %Y-%m-%d %l:%M %p #[fg=colour252,bg=colour236,nobold,nounderscore,noitalics]#[fg=colour235,bg=colour252] #H "
# set -g status-right "#[fg=colour235,bg=colour252] #H "
set -g status-right ""
setw -g window-status-format "#[fg=colour244,bg=default] #I #[fg=colour250,bg=default] #W#{?window_zoomed_flag,[Z],} "
setw -g window-status-current-format "#[fg=colour234,bg=colour31,nobold,nounderscore,noitalics]#[fg=colour117,bg=colour31] #I #[fg=colour231,bg=colour31,bold] #W#{?window_zoomed_flag,[Z],} #[fg=colour31,bg=default,nobold,nounderscore,noitalics]"
set -g status-position top
# end tmux statusbar config
# transparent status bar
# set-option -g status-style bg=default
# #-----------------------------------------------------------
# set -g status 'on'
# set -g status-position bottom
# set -g status-bg 'colour235'
# set -g status-justify 'centre'
# set -g status-left-length '100'
# set -g status-right-length '100'
# set -g message-style fg='colour222',bg='colour238'
# set -g message-command-style fg='colour222',bg='colour238'
# set -g pane-border-style fg='colour238'
# set -g pane-active-border-style fg='colour154'
# setw -g window-status-activity-style fg='colour154',bg='colour235',none
# setw -g window-status-separator ''
# setw -g window-status-style fg='colour121',bg='colour235',none
# set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #W #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] #(whoami) #(uptime | cut -d " " -f 1,2,3) #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
# set -g status-right '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] %r %a %Y #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #H #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour232,bg=colour154] #(rainbarf --battery --remaining --no-rgb) '
# setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
# setw -g window-status-current-format '#[fg=colour235,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #I #W #F #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]'
#-----------------------------------------------------------
set-option -g mouse on
# Local config
# if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
# run -b '$HOME/.tmux/plugins/tpm/tpm'