-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_tmux.conf
120 lines (87 loc) · 4.34 KB
/
dot_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
#------------------------------------------------------
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# TMUX-RESURRECT
# Capture contents of each pane
set -g @resurrect-capture-pane-contents 'on'
# Set to resurrect neovim sessions
set -g @resurrect-strategy-nvim 'session'
#------------------------------------------------------
# Use tmux 256 colors and enable italics.
set -g default-terminal "xterm-256color"
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
# Prefix
unbind C-b
set -g prefix ^A
bind a send-prefix
# Reload tmux config with <prefix>-r.
bind-key r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
# Set scroll history to 100,000 lines.
set-option -g history-limit 100000
# C-a prefix for nested tmux sessions.
#bind-key -n C-a send-prefix
# Lower the time it takes to register ESC.
set -s escape-time 0
# Mouse mode on.
set -g mouse on
# Do not copy selection and cancel copy mode on drag end event
# Prefer iTerm style selection: select, then mouse click to copy to buffer
unbind -T copy-mode-vi MouseDragEnd1Pane
bind -T copy-mode-vi MouseDown1Pane select-pane \; send-keys -X copy-pipe "pbcopy" \; send-keys -X clear-selection
# Use C-p and p to access most recently copied buffer
bind C-p choose-buffer
bind p paste-buffer
# Copy to system clipboard with "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
# When scrolling with mouse wheel, reduce number of scrolled rows per tick to 1.
bind-key -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 1 scroll-up
bind-key -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 1 scroll-down
# Use Vim keybindings in copy mode.
set-window-option -g mode-keys vi
# Split panes using | and -.
unbind-key '"'
unbind-key %
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
# Vim-like pane navigation and resizing.
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key -r H resize-pane -L 5
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r L resize-pane -R 5
# Renumber windows when a window is closed.
set -g renumber-windows on
# Turn on activity monitors.
set -g monitor-activity on
set -g visual-activity off
# Create new session.
bind-key C-c new-session -c "~"
# Search for a session.
bind-key C-f command-prompt -p find-session 'switch-client -t %%'
## COLORSCHEME: gruvbox dark
set-option -g status "on"
set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1
set-window-option -g window-status-activity-style bold,underscore
set-option -g pane-active-border-style fg=colour250 #fg2
set-option -g pane-border-style fg=colour237 #bg1
set-option -g message-style bg=colour239,fg=colour223 # bg=bg2, fg=fg1
set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1
set-option -g display-panes-active-colour colour250 #fg2
set-option -g display-panes-colour colour237 #bg1
set-option -g status-justify "left"
set-option -g status-left-style none
set-option -g status-left-length "80"
set-option -g status-right-style none
set-option -g status-right-length "80"
set-window-option -g window-status-separator ""
set-option -g status-left "#[fg=colour248, bg=colour241] #S #[fg=colour241, bg=colour237, nobold, noitalics, nounderscore]"
set-option -g status-right "#[fg=colour248, bg=colour237, nobold, noitalics, nounderscore]#{?client_prefix,#[reverse]⌨#[noreverse],}#[fg=colour237, bg=colour248] #h "
set-window-option -g window-status-current-format "#[fg=colour237, bg=colour214, nobold, noitalics, nounderscore]#[fg=colour239, bg=colour214] #I #[fg=colour239, bg=colour214, bold] #W #[fg=colour214, bg=colour237, nobold, noitalics, nounderscore]"
set-window-option -g window-status-format "#[fg=#{?window_bell_flag,colour235,colour237},bg=#{?window_bell_flag,colour237,colour239},noitalics]#[fg=#{?window_bell_flag,colour235,colour223},bg=#{?window_bell_flag,colour167,colour239}] #I #[fg=#{?window_bell_flag,colour235,colour223}, bg=#{?window_bell_flag,colour167,colour239}] #W #[fg=#{?window_bell_flag,colour237,colour239},bg=#{?window_bell_flag,colour235,colour237},noitalics]"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'