-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
143 lines (110 loc) · 4.07 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
## main options
# start numbering from 1
set -g base-index 1
setw -g pane-base-index 1
# renumber other windows on close
set -g renumber-windows on
# do not rename windows to running process name
#setw -g automatic-rename off
# scrollback buffer
set-option -g history-limit 10000
# set default terminal (256 colors for vim)
set -g default-terminal "screen-256color"
# start all windows in the same dir
#set -g default-path "-"
# ANSI OSC 52 clipboard integration
set -g set-clipboard on
# ANSI OSC 52 workaround for mosh
# set-option -ag terminal-overrides ",xterm-256color:Ms=\\E]52;c;%p2%s\\7"
# for iTerm integration
setw -g aggressive-resize off
# pane titles
set -g pane-border-status bottom
# tmuxline
set -g status-justify "left"
set -g status "on"
set -g status-left-style "none"
set -g message-command-style "fg=colour231,bg=colour240"
set -g status-right-style "none"
set -g pane-active-border-style "fg=colour25"
set -g status-style "none,bg=colour233"
set -g message-style "fg=colour231,bg=colour240"
set -g pane-border-style "fg=colour240"
set -g status-right-length "100"
set -g status-left-length "100"
setw -g window-status-activity-style "none,fg=colour25,bg=colour233"
setw -g window-status-separator ""
setw -g window-status-style "none,fg=colour59,bg=colour233"
set -g status-left "#[fg=colour189,bg=colour25] [#S] #[fg=colour25,bg=colour233,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=colour25,bg=colour233,nobold,nounderscore,noitalics]#[fg=colour189,bg=colour25] #{?pane_synchronized,#[bg=red]\[SYNC\]#[bg=colour25] ,}%H:%M %d-%b-%y "
setw -g window-status-format "#[fg=colour233,bg=colour233,nobold,nounderscore,noitalics]#[default] #I:#W#F #[fg=colour233,bg=colour233,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=colour233,bg=colour240,nobold,nounderscore,noitalics]#[fg=colour231,bg=colour240] #I:#W#F #[fg=colour240,bg=colour233,nobold,nounderscore,noitalics]"
setw -g monitor-activity
# mouse support
set -g mouse on
setw -g xterm-keys on
# for vim integration
set -g focus-events on
## key bindings
# screen prefix
set -g prefix ^A
bind _ split-window -v -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
# start fresh for new name
bind , command-prompt -I "rename-window "
# much like c, but for sessions
bind C command-prompt -I "new-session -s "
# toggle status bar
bind b set status\; display-message "Status bar toggled"
# toggle sync
bind S set synchronize-panes \; display-message "Syncronize panes toggled"
# command menu
bind + 'run-shell -b ~/.consart/bin/tmux-same-any'
bind @ 'run-shell -b ~/.consart/bin/tmux-same-ssh'
bind ` display-popup
bind n next-window
bind N previous-window
bind q last-window
bind Q switch-client -l
# vi mode
set -g mode-keys vi
bind Escape copy-mode
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#bind C-h select-pane -L
#bind C-j select-pane -D
#bind C-k select-pane -U
#bind C-l select-pane -R
# resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# <> move window
bind -r "<" swap-window -d -t -1
bind -r ">" swap-window -d -t +1
bind -r "@" rotate-window
# like x but for windows
unbind &
bind X confirm-before -p "kill-window #W? (y/n)" kill-window
# left click status bar to switch sessions
bind -n MouseDown1StatusLeft choose-tree -Zs
# reload config
bind R source-file ~/.tmux.conf\; display-message "Sourced .tmux.conf"
# start copy mode on scrolling
bind WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind WheelDownPane select-pane -t= \; send-keys -M
# always use the symlink for ssh-agent socket
#setenv -g SSH_AUTH_SOCK /home/leet/.ssh/ssh-agent
#set -g update-environment -r
## plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-resurrect'
## plugin settings
#set -g @continuum-restore 'on'
set -g @resurrect-processes 'autossh ssh k9s vim man less top htop atop kubectl nc socat docker'
run '~/.tmux/plugins/tpm/tpm'