-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
105 lines (82 loc) · 2.82 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
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# For nested tmux sessions
bind-key a send-prefix
bind-key -n C-q send-prefix
# Shortcuts for switching the prefix key.
# Convenient when working in a nested session.
bind-key C-i set -g prefix C-b
bind-key C-u set -g prefix C-a
# Start window and pane indices at 1
# set -g base-index 1
# set -g pane-base-index 1
# Status bar styling and content
set -g status-left '#S '
# set -g window-status-current-style "fg=colour231,bg=colour4" # blue
set -g window-status-current-style "fg=colour231,bg=colour62" # purple
# copy mode
setw -g mode-style 'fg=colour231,bg=colour61'
set -g status-style "fg=default,bg=default"
set -g status-left-style "fg=default,bg=default"
# Status Bar Right
# set -g status-right "#(tmux-status)"
set -g status-right "#H"
# Toggle Status Bar
bind-key b set -g status
# Set that stupid Esc-Wait off, so vim works properly
set-option -sg escape-time 0
set -g default-terminal "screen-256color"
set -g history-limit 100000
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# faster shortcuts / lazy control
bind ^N next-window
bind ^P previous-window
bind ^S choose-tree
bind ^[ copy-mode
bind -n WheelUpPane copy-mode
set-option -g mouse on
set-option buffer-limit 10
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
bind < resize-pane -L 4
bind > resize-pane -R 4
bind - resize-pane -D 4
bind + resize-pane -U 4
# Setup 'v' to begin selection as in Vim
bind-key -Tcopy-mode-vi v send -X begin-selection
bind-key -Tcopy-mode-vi V send -X begin-selection
# bind-key -Tcopy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# set-option -g default-command "reattach-to-user-namespace -l zsh"
# Make new windows start in the same directory as the current window
bind-key c new-window -c "#{pane_current_path}"
bind-key % split-window -h -c "#{pane_current_path}"
bind-key "\"" split-window -c "#{pane_current_path}"
# For clearing the screen since C-l is occupied by vim-tmux-navigator now
bind C-l send-keys 'C-l'
bind-key r run-shell "touch #{pane_current_path}/tmp/restart.txt"
bind-key R source-file ~/.tmux.conf
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
set -g @resurrect-processes 'vim nvim man less tail top htop irssi irb pry'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
# tmux plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'jbnicolai/tmux-fpp'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'laktak/extrakto'
# Initialize tmux plugin manager
run '~/.tmux/plugins/tpm/tpm'
source-file ~/.tmux_private.conf