-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
89 lines (70 loc) · 2.27 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
# Set true color
set-option -ga terminal-overrides "xterm-256color:Tc"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'astonlele/tmux-theme'
# Enable mouse support
setw -g mouse on
# Dont detach when session is killed
set-option -g detach-on-destroy off
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
# set-window-option -g pane-base-index 1
set-option -g renumber-windows on
set-option -g status-interval 1
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{pane_current_command}'
# Status
set-option -g status-position top
# Set prefix
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window
# Alt number to switch windows
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
setw -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key -n C-f run-shell "tmux neww ~/scripts/tmux-sessionizer"
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind -n M-k resize-pane -U 5
bind -n M-j resize-pane -D 5
bind -n M-h resize-pane -L 5
bind -n M-l resize-pane -R 5
# Restore autorename after manual rename
bind r setw automatic-rename
# Reload theme
bind C-l run-shell "~/.tmux/plugins/tmux-theme/scripts/my-theme.sh"
# prefix = C-a
# Ressurect
# prefix + Ctrl-s - save
# prefix + Ctrl-r - restore
# Usefull shortcuts
# Kill session :kill-session
# Rename session prefix + $
# Reorder windows swap-window -s 1 -t 2
# swap-window -t 2
# Swap panes prefix + { or }
# Rename window prefix + ,
# Move window prefix + .
run '~/.tmux/plugins/tpm/tpm'