-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
142 lines (107 loc) · 5.13 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
# -----------------------------------------------------------------------------
# This config is targeted for tmux 3.0+ which is painless to install on
# Ubuntu 20.04 LTS (official apt repo), Debian Buster (backports) and Arch.
#
# Read the "Plugin Manager" section (bottom) before trying to use this config!
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# Global options
# -----------------------------------------------------------------------------
# Set a new prefix / leader key.
set -g prefix `
bind ` send-prefix
# # Allow opening multiple terminals to view the same session at different sizes.
setw -g aggressive-resize on
# # Remove delay when switching between Vim modes.
set -sg escape-time 0
# # Allow Vim's FocusGained to work when your terminal gains focus.
# # Requires Vim plugin: https://github.com/tmux-plugins/vim-tmux-focus-events
set -g focus-events on
# # Enable color support inside of tmux.
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
# # Ensure window titles get renamed automatically.
setw -g automatic-rename
# # Ensure window index numbers get reordered on delete.
set-option -g renumber-windows on
# # Start windows and panes index at 1, not 0.
set -g base-index 1
setw -g pane-base-index 1
# # Enable full mouse support.
set -g mouse on
# # Various colors.
set -g status-style fg=colour244
set -g window-status-current-style fg=colour222
set -g pane-border-style fg=colour240
set -g pane-active-border-style fg=colour243
# # -----------------------------------------------------------------------------
# # Key bindings
# # -----------------------------------------------------------------------------
# # Unbind default keys
unbind C-b
unbind '"'
unbind %
# # Split panes.`h
bind-key u split-window -h
bind-key v split-window -v
# # Move around panes with ALT + arrow keys.
bind-key -n M-Up select-pane -U
bind-key -n M-Left select-pane -L
bind-key -n M-Down select-pane -D
bind-key -n M-Right select-pane -R
# Clear history
bind -n C-k send-keys -R \; clear-history
# Make the status bar look fancy!
set -g status-justify 'centre'
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) #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
set -g status-right '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] %r #(gitmux "#{pane_current_path}")'
# #I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F
setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I #(pwd="#{pane_current_path}"; echo ${pwd####*/})#F #[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 #(pwd="#{pane_current_path}"; echo ${pwd####*/})#F #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]'
# # -----------------------------------------------------------------------------
# # Plugin Manager - https://github.com/tmux-plugins/tpm
# # In order to use the plugins below you need to install TPM and the plugins.
# # Step 1) git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# # Step 2) Reload tmux if it's already started with `r
# # Step 3) Launch tmux and hit `I (capital i) to fetch any plugins
# # -----------------------------------------------------------------------------
# # List of plugins.
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
# # tmux-resurrect settings.
set -g @resurrect-strategy-vim 'session'
# Scroll up with mouse
set-option -g mouse on
set -g set-clipboard on
# Scrollback buffer
set -g history-limit 50000
# command delay? We don't want that, make it short
set -g escape-time 10
# Allow the arrow key to be used immediately after changing windows
set-option -g repeat-time 0
# Set window notifications
set -g monitor-activity on
set -g visual-activity on
# Update files on focus (using for vim)
set -g focus-events on
# Status update interval
set -g status-interval 1
# Reduce time to wait for Escape key. You'll want this for neovim.
set-option escape-time 40
# Option to clear histroy
bind -n C-k clear-history
bind-key -n C-l send-keys 'C-l'
bind-key R switch-client -r
# Allow us to reload our Tmux configuration while
# using Tmux
bind r source-file ~/.tmux.conf \; display "Reloaded!"
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
set -g @plugin 'casonadams/tmux-vi-navigation'
set -g @yank_selection 'clipboard'
set -g @yank_selection_mouse 'clipboard'
# Log to the .tmux folder instead of the window a session is started from
set -g @logging-path "~/.tmux"
# Initialize TPM (keep this line at the very bottom of your tmux.conf).
run -b '~/.tmux/plugins/tpm/tpm'