-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
112 lines (82 loc) · 3.42 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
# -- General -------------------------------------------------------------------
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
set -s focus-events on
set -g mouse on
set -g prefix2 C-a # GNU-Screen compatible prefix
bind C-a send-prefix -2
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
setw -q -g utf8 on
set -g history-limit 5000 # boost history
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
bind r source-file ~/.tmux.conf \; display "Config reloaded!"
# -- Status Bar ----------------------------------------------------------------
set -g 'status-format[1]' ''
set -g status 2
set -g status-style bg=default,fg=colour255
setw -g window-status-style fg=cyan,bg=default,dim
setw -g window-status-current-style fg=magenta,bg=colour135
set -g status-left-length 100
set -g status-left "#[fg=blue]|#S:#I:#P| #{prefix_highlight}"
set-option -g status-right-length 120
set -g status-right "#[fg=yellow]%d %b %Y | %H:%M:%S #[fg=blue]"
set -g window-status-format '#[fg=white,bg=default] #I:#W - #(pwd="#{pane_current_path}"; echo ${pwd####*/}) '
set -g window-status-current-format '#[fg=black,bg=red] #I:#W - #(pwd="#{pane_current_path}"; echo ${pwd####*/}) '
set -g status-position top
set -g status-interval 1
# -- Navigation ----------------------------------------------------------------
# create session
bind C-c new-session
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
# session navigation
bind BTab switch-client -l # move to last session
# split current window horizontally
bind - split-window -v -c "#{pane_current_path}"
# split current window vertically
bind _ split-window -h -c "#{pane_current_path}"
# pane navigation
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# window navigation
unbind n
unbind p
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
# -- Copy mode -----------------------------------------------------------------
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Use xsel or pbcopy for copy-pasting
if-shell -b '[ "$(uname)" = "Linux" ]' {
set -s copy-command "wl-copy"
}
# Use pbcopy for copy-pasting on OS X
if-shell -b '[ "$(uname)" = "Darwin" ]' {
set -s copy-command "reattach-to-user-namespace pbcopy"
}
set -g set-clipboard off
bind -Tcopy-mode-vi v send -X begin-selection
bind -Tcopy-mode-vi y send -X copy-pipe-and-cancel
bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel
# -- Plugins -------------------------------------------------------------------
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm