-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
85 lines (63 loc) · 2.53 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
set-option -g prefix C-a
bind-key C-a last-window
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'Moranton/tmux-fingers'
set-option -g default-shell /bin/bash
setw -g mode-keys vi
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
# vim-like pane resizing
bind -r C-k resize-pane -U
bind -r C-j resize-pane -D
bind -r C-h resize-pane -L
bind -r C-l resize-pane -R
# Use Alt-vim keys without prefix key to switch panes
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
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
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
bind -n M-0 select-window -t 0
bind -n M-Tab select-pane -t :.+
bind -n M-S-Tab select-pane -t :.-
bind -n M-z resize-pane -Z
set -s escape-time 0
unbind r
bind r source-file ~/.tmux.conf
bind c new-window -c '#{pane_current_path}'
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# UI
setw -g mode-style 'fg=colour1 bg=colour18 bold'
set -g pane-border-style 'fg=blue bg=blue'
set -g pane-active-border-style 'fg=magenta bg=magenta'
set -g status-style 'bg=colour0 fg=colour4'
setw -g window-status-current-style 'fg=cyan bg=blue bold'
setw -g window-status-current-format ' #I #[fg=colour255]#W#[fg=cyan] #F '
setw -g window-status-style 'fg=cyan bg=colour0 bold'
setw -g window-status-format ' #I #[fg=white]#W#[fg=cyan] #F '
set -g status-right-style 'fg=white bold'
set -g status-right '[#S]'
set -g status-left ''
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',*:Tc'
# set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
bind C-j split-window -v "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'