-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf.linux
178 lines (137 loc) · 5.08 KB
/
.tmux.conf.linux
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
set -g default-terminal "screen-256color"
set -g default-shell /usr/bin/fish
# Prefix: Use Ctrl-A.
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Start numbering at 1
set -g base-index 1
# Faster key repetition
set -s escape-time 0
# Don't constrain window sizes to smallest connected session
setw -g aggressive-resize on
# Send prefix for nested tmux
bind-key b send-prefix
# Additional split options
bind-key | split-window -h
bind-key - split-window -v
unbind '"'
unbind %
# Pane management
bind-key F command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key T command-prompt -p "send pane to:" "join-pane -t '%%'"
# Key fix for XTerm
set-window-option -g xterm-keys on
# Kill windows without asking
unbind x
bind x kill-pane
# Mouse mode
set -g mouse on
# Maximize
bind m run ". ~/.tmux/zoom"
# Reload config file
bind r source-file ~/.tmux.conf
# Previous window
unbind a
bind a previous-window
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -Tcopy-mode-vi v send -X begin-selection
bind-key -Tcopy-mode-vi y send -X copy-pipe "perl -ln0e 's/(^ |\n)//mg if (/^http/); print' | xclip -i"
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe "perl -ln0e 's/(^ |\n)//mg if (/^http/); print' | xclip -i"
# don't rename windows automatically
set-option -g allow-rename off
# Use Shift-arrow keys without prefix key to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
######################
### DESIGN CHANGES ###
######################
# panes
set -g pane-border-style fg=black
set -g pane-active-border-style fg=brightred
## Status bar design
# status line
set -g status-justify left
set -g status-bg default
set -g status-fg colour12
set -g status-interval 2
# messaging
set -g message-style fg=black,bg=yellow
set -g message-command-style fg=blue,bg=black
#window mode
setw -g mode-style bg=colour6
setw -g mode-style fg=colour0
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# The modes {
setw -g clock-mode-colour colour135
setw -g mode-style bold
setw -g mode-style fg=colour196,bg=colour238
# }
# The panes {
set -g pane-border-style bg=colour235,fg=colour238
set -g pane-active-border-style bg=colour236,fg=colour51
# }
# The statusbar {
set -g status-position bottom
setw -g window-status-current-style fg=colour81,bg=colour238,bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-style fg=colour138,bg=colour235,none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style bold,fg=colour255,bg=colour1
# }
# The messages {
set -g message-style bold,fg=colour232,bg=colour166
# }
# easily toggle synchronization (mnemonic: e is for echo)
# sends input to all panes in a given window.
bind e setw synchronize-panes on
bind E setw synchronize-panes off
# Percol integration
bind b split-window "tmux lsw | percol --initial-index (tmux lsw | awk '/active.$/ {print NR-1}') | cut -d':' -f 1 | tr -d '\n' | xargs -0 tmux select-window -t"
bind B split-window "tmux ls | percol --initial-index (tmux ls | awk \"/^$(tmux display-message -p '#{session_name}'):/ {print NR-1}\") | cut -d':' -f 1 | tr -d '\n' | xargs -0 tmux switch-client -t"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-logging'
#set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-fpp'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'yardnsm/tmux-1password'
#set -g @plugin 'erikw/tmux-powerline'
set -g @fpp-key 'f'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '30'
set -g @resurrect-processes 'tf5'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session'
set -g @prefix_highlight_fg 'colour232'
set -g @prefix_highlight_bg 'colour240,bold'
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=232,bg=colour240,bold'
set -g focus-events on
set-option -g status on
set-option -g status-interval 1
set-option -g status-justify "centre"
set-option -g status-left-length 150
set-option -g status-right-length 180
set -g history-limit 50000
if-shell -b 'test -n "$WSLENV"' 'bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel clip.exe'
if-shell -b 'test -n "$WSLENV"' 'bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel clip.exe'
run-shell "powerline-daemon -q"
source "/usr/share/powerline/bindings/tmux/powerline.conf"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'