-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
131 lines (111 loc) · 3.68 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
# Setting the prefix from C-b to C-a
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
# Ensure that we can send Ctrl-A to other apps
bind C-a send-prefix
set -g default-shell $SHELL
# Unbind arrow keys
unbind Up
unbind Down
unbind Left
unbind Right
# clear scrollback buffer
# bind -n C-k clear-history
bind-key C send-keys "clear && tmux clear-history" \; send-keys "Enter"
# Hotkeys using Alt/Option as a modifier
bind-key -n M-n new-window -c "#{pane_current_path}"
bind-key -n M-1 select-window -t :1
bind-key -n M-2 select-window -t :2
bind-key -n M-3 select-window -t :3
bind-key -n M-4 select-window -t :4
bind-key -n M-5 select-window -t :5
bind-key -n M-6 select-window -t :6
bind-key -n M-7 select-window -t :7
bind-key -n M-8 select-window -t :8
bind-key -n M-9 select-window -t :9
bind-key -n M-0 select-window -t :0
bind-key -n M-f resize-pane -Z
bind-key -n M-. select-window -n
bind-key -n M-, select-window -p
bind-key -n M-< swap-window -t -1
bind-key -n M-> swap-window -t +1
bind-key -n M-x confirm-before "kill-pane"
bind-key -n M-X confirm-before "kill-window"
bind-key -n M-- split-window -v -c "#{pane_current_path}"
bind-key -n M-\\ split-window -h -c "#{pane_current_path}"
bind-key -n M-R command-prompt -I "#W" "rename-window '%%'"
bind-key -n M-/ copy-mode
# set the window and panes index
set -g base-index 1
setw -g pane-base-index 1
# renumber if closed
set -g renumber-windows on
# create shortcut to reload the config
bind r source-file ~/.tmux.conf \; display "tmux.conf reloaded!"
# PANES
# split panes
bind | split-window -h -c "#{pane_current_path}" # Split the current pane into two, left and right
bind - split-window -v -c "#{pane_current_path}" # Split the current pane into two, top and bottom
unbind '"'
unbind %
# resize panes
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
# select panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind Q kill-session
# select windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# mouse support
set -g mouse on
# notifications
setw -g monitor-activity on
set -g visual-activity on
set -g bell-action any
set -g visual-bell off
# automatically set window titles
set -g set-titles on
set -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not)
# keybind preference
setw -g mode-keys vi
set -g status-keys vi
# remap copy and paste keys
unbind [
unbind ]
# bind Escape copy-mode
unbind p
bind p paste-buffer
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-selection
set -g status on
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'schasse/tmux-jump'
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
# Automatically restore tmux windows when tmux starts
set -g @continuum-restore 'off'
# Don't auto-launch tmx at machine boot
set -g @continuum-boot 'off'
# Preserves what was readable in each pane
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session'
set -g @themepack-status-left-area-right-suffix "#{pomodoro_status}"
set -g @themepack-status-right-area-right-suffix "#{tmux_mode_indicator}"
source-file "${HOME}/.tmux-themepack/powerline/block/yellow.tmuxtheme"
set -g @plugin 'olimorris/tmux-pomodoro-plus'
set -g @pomodoro_notifications 'on'
set -g @pomodoro_start 'm'
set -g @pomodoro_cancel 'M'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'