-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
114 lines (91 loc) · 3.26 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
# General
set -g mouse on
# Set prefix of <C-Space>
unbind C-b
set -g prefix C-Space
# Issue with underline colors
set-option -g default-terminal "xterm-256color"
# Keybinds
## https://github.com/tmux/tmux/blob/a9d0461/key-bindings.c#L362
bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
bind s set-option -g status
bind h split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
# Vim-like bindings
bind-key -n M-\; command-prompt
bind-key -n M-, command-prompt -I "#W" { rename-window -- '%%' }
bind-key -n M-. command-prompt -I "#S" { rename-session -- '%%' }
bind-key -n M-y copy-mode
bind-key -n M-p paste-buffer -p
bind-key -n M-d detach-client
## Tab navigation hotkeys (Based on Google Chrome)
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 10
bind-key -n M-h previous-window
bind-key -n M-l next-window
bind-key -n M-j switch-client -n
bind-key -n M-k switch-client -p
bind-key -n M-t new-window -c "#{pane_current_path}"
bind-key -n M-n new-session -c "#{pane_current_path}"
bind-key -n M-w confirm-before -p ":kill-window #W? (y/n)" kill-window
bind-key -n M-r confirm-before -p ":refresh #W? (y/n)" { respawn-pane -k }
bind-key -n M-Left swap-window -t -1 \; select-window -t -1
bind-key -n M-Right swap-window -t +1 \; select-window -t +1
# Start window index at 1
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
# Copy
set -s set-clipboard on
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
# Color & Design
## don't do anything when a 'bell' rings
set -g visual-activity off
set -g visual-bell on
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action any
## clock mode
setw -g clock-mode-color color84
## copy mode
setw -g mode-style fg=black,bg=color195
## window
# set -g window-style 'fg=colour247,bg=colour236'
# set -g window-style 'bg=red'
# set -g window-active-style 'fg=colour250,bg=black'
# set -g window-style 'bg=red'
## panes
set -g pane-border-style fg=color235,bg=color235
set -g pane-active-border-style fg=color248,bg=color248
## statusbar
set -g status-position top
set -g status-justify left
set -g status-style fg=white,bg=color235
setw -g status-left " #S \u23b9 "
set -g status-left-length 20
set -g status-right-style fg=black,bg=color248
set -g status-right ' %a %b %-e %-l:%M %p '
set -g status-right-length 50
setw -g window-status-current-style fg=black,bg=color248
setw -g window-status-current-format ' #I #W #F '
setw -g window-status-style fg=color245,bg=color236
setw -g window-status-format ' #I #W #F '
setw -g window-status-bell-style fg=color84,bg=color84,bold
## messages
set -g message-style fg=black,bg=color248,bold
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
run '~/.tmux/plugins/tpm/tpm'