-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
69 lines (54 loc) · 1.97 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
# remap prefix to Control + a
set -g prefix C-a
# bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
unbind C-b
# move windows
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
# k8s
set -g status-right "#(/bin/bash $HOME/.tmux/kube.tmux 250 red cyan)"
# open in same dir
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Bind D to resize the window to be 8 lines smaller
bind D resize-pane -D 6
# Move around panes with hjkl, as one would in vim after pressing ctrl + w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Switch betewen panes using alt + arrow
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Use shift + arrow key to move between windows in a session
bind -n S-Left previous-window
bind -n S-Right next-window
# Setup 'v' to begin selection, just like Vim
bind-key -T copy-mode-vi 'v' send -X begin-selection
# Setup 'y' to yank (copy), just like Vim
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi 'V' send -X select-line
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
# Default statusbar color
set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1
# Set active pane border color
set-option -g pane-active-border-style fg=colour214
# Set inactive pane border color
set-option -g pane-border-style fg=colour239
# Use m to toggle mouse mode
unbind m
bind m setw mouse
#setw -g mode-mouse on
#set -g mouse-select-pane on
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
run -b '~/.tmux/plugins/tpm/tpm'