/
.tmux.conf
101 lines (80 loc) · 3.51 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
# tmux plugin configuration
set -g @continuum-restore 'on'
set -g @continuum-save-interval '5'
set -g @resurrect-capture-pane-contents 'off'
set -g @yank_selection 'primary'
# activate tmux plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Those two allow continuous saving and restoring of tmux sessions
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-sessionist'
# # Use the OS X pasteboard hack if available
# if 'command -v reattach-to-user-namespace >/dev/null' \
# 'set -gq @osx-pasteboard true'
# #if 'tmux show -gv @osx-clipboard' \
# 'set -g default-command "reattach-to-user-namespace -l $SHELL"'
# if-shell "uname | grep -q Darwin" "set -g default-command 'reattach-to-user-namespace -l $SHELL"
# # setup os specific copy in tmux vi mode
# if-shell "uname | grep -q Darwin" {
# bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
# bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
# } {
# bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# }
set-option -g default-terminal "screen-256color"
set-window-option -g xterm-keys on
# Reduce wait time after escape so apps like vim are usable
set-option -sg escape-time 50
# Set history to 10K
set -g history-limit 10000
# Zero key is useless for window shortcuts, so start at 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
set-option -g lock-command vlock
# Set prefix key for nested tmux sessions
bind-key -n C-a send-prefix
# Navigation shortcuts
bind-key C-a last-window
bind-key Space next-window
bind-key C-Space previous-window
# bind-key -r C-S-Left swap-window -t -1
# bind-key -r C-S-Right swap-window -t +1
bind-key -r C-S-Left swap-window -t -1\; select-window -t -1
bind-key -r C-S-Right swap-window -t +1\; select-window -t +1
bind-key s set-window-option synchronize-panes
# Reload settings after a config edit
bind-key r source-file ~/.tmux.conf \;\
display-message "Config reloaded."
set-window-option -g aggressive-resize on
# bells and monitoring
set -g display-time 100
set -g visual-activity on
set -g visual-silence on
set -g visual-bell on
set -g bell-action any
# Turn on all of the interactive mouse mode.
# Just use <shift> for text cut/paste
set -g mouse on
# Set pretty status bar
set -g status-bg colour236
set -g status-fg white
set -g status-left "#[fg=green][#[fg=cyan]#S#[fg=green]]#[fg=colour250] #H #[default]"
set -g status-left-length 20
set -g status-justify left
setw -g window-status-current-format '#[fg=colour250,bg=colour025] #I:#[fg=colour250,bg=colour025]#W#F '
# setw -g window-status-current-bg colour25
# setw -g window-status-current-attr bold
setw -g window-status-current-style bg=colour25,bold
set -g status-right "#{?pane_synchronized,#[fg=colour025]⇌#[default],} #[fg=colour244]◉ #{continuum_status} #[default] %a %m/%d %H:%M #[default]"
# set -gw window-status-bell-bg brightred
# set -gw window-status-bell-fg colour143
# set -gw window-status-bell-attr none
setw -g window-status-bell-style fg=colour143,bg=brightred
# load local conf if available
if "test -f ~/.tmux.local.conf" "source-file ~/.tmux.local.conf"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'