-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
110 lines (86 loc) · 3.61 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
set -g prefix2 C-a # GNU-Screen compatible prefix
bind C-a send-prefix -2
# set -g default-shell $SHELL
# set -g default-command 'reattach-to-user-namespace -l ${SHELL}'
setw -g xterm-keys on
# set -s focus-events on
set -g status off
set -sg escape-time 0
set-option -g repeat-time 0
set -g mouse on
set -g @yank_selection 'clipboard'
set -g @yank_selection_mouse 'clipboard'
# https://stackoverflow.com/a/58169660
set -g @yank_action 'copy-pipe'
set-option -g detach-on-destroy off
# https://www.reddit.com/r/vim/comments/75zvux/why_is_vim_background_different_inside_tmux/dob453f/
set -g terminal-overrides ',xterm-256color:Tc'
set -g default-terminal "xterm-256color"
set -as terminal-overrides ',xterm*:sitm=\E[3m'
set -g status-position top
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
set -g renumber-windows on
setw -g automatic-rename off # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g set-titles-string '#{?window_zoomed_flag,📺 ,}#T'
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 1000 # slightly longer status messages display time
set -g status-interval 10 # redraw status line every 10 seconds
# activity
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action none
# bind M-2 select-layout even-vertical
# bind M-1 select-layout even-horizontal
# bind-key -n C-t new-window
# bind-key -n C-T new-window -c "#{pane_current_path}"
# bind-key -n C-w kill-pane
bind D source-file ~/.tmux/dev
# split current window horizontally
bind - split-window -c '#{pane_current_path}'
# split current window vertically
bind _ split-window -h -c '#{pane_current_path}'
bind | split-window -h -c '#{pane_current_path}'
set -g history-limit 5000 # boost history
# reload configuration
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
bind b list-buffers # list paste buffers
bind p paste-buffer # paste from the top paste buffer
bind P choose-buffer # choose which buffer to paste from
# create session
bind C-c new-session
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
bind Enter copy-mode # enter copy mode
set-window-option -g mode-style "bg=#e7da86,fg=#333333"
# panes
set -g pane-border-style 'fg=colour245'
set -g pane-active-border-style 'fg=colour245'
# statusbar
set -g status-position bottom
set -g message-style 'bg=#e7da86,fg=#333333'
# pane navigation
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# maximize current pane https://superuser.com/a/576505
bind z resize-pane -Z
# window navigation
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
# https://github.com/tmux-plugins/tpm/issues/193
run-shell ~/.tmux/plugins/tmux-sensible/sensible.tmux
run-shell ~/.tmux/plugins/tmux-yank/yank.tmux
run-shell ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
run-shell ~/.tmux/plugins/tmux-continuum/continuum.tmux