-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
95 lines (77 loc) · 3.19 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
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# Maximizes tmux window
set-window-option -g aggressive-resize on
# easy reload tmux config
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config'
# switch panes using Alt/option-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# set current windows name to basename of current dir
bind 'b' rename-window "#{b:pane_current_path}"
# Split tmux pane in current directory
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
# Use shift + arrow key to move between windows in a session
bind -n S-Left previous-window
bind -n S-Right next-window
# Start window and pane indices at 1.
set -g base-index 1
set -g pane-base-index 1
# Renumber windows on closing one
set -g renumber-windows on
# increase history limit
set-option -g history-limit 150000
# Add a second prefix
set-option -g prefix2 C-a
# Themes
# powerline
set-option -g status on
set-option -g status-interval 2
#set-option -g status-utf8 on
set-option -g status-style "bg=colour235"
set-option -ag status-style "fg=colour255"
#set-option -g status-style "bg=colour255"
#set-option -ag status-style "fg=colour235"
set-option -g status-justify "centre"
set-option -g window-status-separator ""
set-option -g window-status-format "#[fg=colour102 bg=default]#I#{?pane_synchronized,:⛓,:}#W#[fg=colour235 bg=colour235]"
set-option -g window-status-current-format "#[fg=colour235 bg=colour0]#[fg=default bg=colour0]#I:#W#[fg=colour0 bg=colour235]"
set-option -g window-status-current-style "fg=colour255"
set-option -ag window-status-current-style "bg=colour0"
#set-option -g window-status-style "bg=colour0"
set -g pane-active-border-style "bg=default fg=colour33"
# configure status left
set-option -g status-left-length 90
set-option -g status-left "#(~/.shell/status_left.sh)"
# configure status right
set-option -g status-right-length 40
set -g @prefix_highlight_fg 'white' # default is 'colour231'
set -g @prefix_highlight_bg 'blue' # default is 'colour04'
set -g status-right '#{prefix_highlight}%a %Y-%m-%d %H:%M'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Automatic restore of tmux continuum
set -g @continuum-restore 'on'
## Use vim keybindings in copy mode
set-option -g mouse on
setw -g mode-keys vi
set-option -s set-clipboard off
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X rectangle-toggle
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
bind -n C-F copy-mode \; send-key ?
# initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.tmux/plugins/'
run -b '~/.tmux/plugins/tpm/tpm'