-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
75 lines (59 loc) · 2.86 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
# remap C-b to C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# bind s split-window -h -p 20 -c "#{pane_current_path}"
# bind g split-window -h -p 20 -c "#{pane_current_path}" -b
# bind v split-window -v -p 30 -c "#{pane_current_path}"
# Switch to last sesions, usefull for cross-project (since i'm using a session per project, with tmux-sessionizer script)
bind k switch-client -l
# switch panes
bind -n M-w select-pane -U
bind -n M-a select-pane -L
bind -n M-s select-pane -D
bind -n M-d select-pane -R
# reload conf
bind r source-file ~/.tmux.conf; display-message "Tmux source file reloaded!"
# VI mode for keys, not sure i'm using this
set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# Color terminal, it's probably the default
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",*:RGB"
# Change color if the panes are synchronized (since it can be deadly)
set -g pane-border-style '#{?pane_synchronized, fg=yellow, fg=black}'
set -g pane-active-border-style '#{?pane_synchronized, fg=red, fg=#52862d}'
# Status bar
set -g status-position top
set -g status-justify centre
# Change color if the panes are synchronized (since it can be deadly)
set -g status-style 'fg=#ffffff #{?pane_synchronized, bg=red, bg=default}'
set -g status-left "[#{session_name}] "
set -g status-left-length 60
# native xterm scrolling
set -g mouse on
set -g history-file ~/.tmux_history
# List of plugins
# set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-processes 'ssh vim nvim django-run "~manage.py"'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_selection_mouse 'clipboard'
run -b '~/.tmux/plugins/tpm/tpm'
# run-shell ~/tmux-resurrect/resurrect.tmux
set -s escape-time 0
set-option -g default-terminal "screen-256color"
bind f run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_sessionizer.py"
bind g run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_select_session.py"
bind h run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_select_pane.py"
bind m run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_ssh_group.py"
bind j run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_multi_ssh.py"
bind i set-window-option synchronize-panes\;
# bind i set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized, #[bg=red]!! ON !!,OFF}"