-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
153 lines (104 loc) · 3.3 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Remove all keybindings first
# unbind-key -a
unbind Escape
set-window-option -g automatic-rename on
set-option -g set-titles on
set-option -g default-shell "/bin/bash"
# Tmux after 2.1
set -g mouse on
# Tmux before 2.1
# setw -g mode-mouse on
# set -g mouse-select-window on
setw -g monitor-activity on
set -g visual-activity on
# Make sure escape doesn't do funky things
set -sg escape-time 0
# Remap prefix
# set-option -g prefix C-Enter
# bind-key C-Enter send-prefix
unbind C-b
# set-option -g prefix C-m
# bind-key C-m send-prefix
set -g prefix C-Space
bind Space send-prefix
# Change pane with prefix
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Change pane without prefix
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Swap panes
# bind -n M-C-h swap-pane -L
bind -n M-C-j swap-pane -D
bind -n M-C-k swap-pane -U
# bind -n M-C-l swap-pane -R
bind i split-window -v
bind o split-window -h
# Split without prefix
bind -n M-i split-window -v -c "#{pane_current_path}"
bind -n M-o split-window -h -c "#{pane_current_path}"
# Cycle windows with Control Tab
bind -n M-p previous-window
bind -n M-n next-window
# Open new windows
bind -n M-t new-window -c "#{pane_current_path}"
# Close with prefix
bind w kill-pane
bind q confirm-before kill-window
# Close without prefix
bind -n M-w kill-pane
bind -n M-q confirm-before kill-window
bind -n M-d detach
bind d detach
# Bind prefix-r to reload tmux config
bind r source-file ~/.tmux.conf
# Copy mode settings
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
# bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b"
# bind -t vi-copy y copy-pipe "xclip -sel clip -i"
bind -n M-c copy-mode
set -g pane-active-border-style fg=red
# set -g pane-active-border-style bg=default
set -g automatic-rename on
set-option -g renumber-windows on
bind -n M-g resize-pane -Z
# set -g mode-mouse on
# set -g mouse-resize-pane on
# set -g mouse-select-pane on
# set -g mouse-select-window on
set -g history-limit 20000
# copy to system clipboard
# bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
# paste from system clipboard
# bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# Basic status bar colors
set -g status-style bg=black,fg=cyan
set -g status-fg cyan
set -g status-left-length 0
set -g status-right-length 0
# set -g pane-border-style 'fg=black bg=white'
# set -g pane-active-border-style 'bg=colour0 fg=colour9'
# Current window status
set -g window-status-style bg=red,fg=black
# Window with activity status
set -g window-status-activity-style bg=yellow,fg=black
# Window status alignment
set -g status-justify centre
# Mode
set -g mode-style bg=red,fg=default
set-option -g status-position top
set -g set-clipboard on
set -g default-terminal "xterm-256color"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
# bind -T copy-mode C-c send -X copy-pipe-no-clear "xsel -i --clipboard"
# bind -T copy-mode-vi C-c send -X copy-pipe-no-clear "xsel -i --clipboard"
run '~/.tmux/plugins/tpm/tpm'
set -g focus-events off