-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
69 lines (59 loc) · 2.31 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
unbind C-b
set -g prefix `
bind ` send-prefix
set -g default-terminal "screen-256color" # terminal type
set -ga terminal-overrides ",*256col*:Tc"
set -g base-index 1 # set initial window index to 1
set -g mouse on # enable mouse support
set -g bell-action none # disable bell
# setw -g xterm-keys on # enable xterm keys
# setw -g mode-keys vi # enable vi mode keys
bind \\ split-window -h -c "#{pane_current_path}" # split horizontally
bind - split-window -v -c "#{pane_current_path}" # split vertically
bind n new-window -c "#{pane_current_path}"
bind e command-prompt 'rename-window %%'
unbind s
bind s command-prompt 'rename-session %%'
bind , previous-window
bind . next-window
unbind x
bind x kill-pane # kill pane without confirmation
bind r source-file ~/.tmux.conf # reload tmux config
unbind o
bind o choose-tree -Zw
unbind w
bind w select-pane -t :.+
# status bar theme
# https://gist.github.com/rajanand02/9407361
set -g status 'on'
set -g status-interval 2
set -g status-position top
set -g status-bg 'colour235'
set -g status-justify 'left'
set -g status-left-length '20'
set -g status-right-length '60'
set -g message-style fg='colour222',bg='colour238'
set -g message-command-style fg='colour222',bg='colour238'
set -g pane-border-style fg='colour238'
set -g pane-active-border-style fg='colour11'
setw -g window-status-activity-style fg='colour11',bg='colour235',none
setw -g window-status-separator ''
setw -g window-status-style fg='colour121',bg='colour235',none
# status bar
set -g status-left ''
set -g status-right '#(status-right)'
setw -g window-status-format '#[fg=colour8,bg=colour235] #W '
setw -g window-status-current-format '#[fg=colour11,bg=colour235,bold] #W '
# clear tmux history with ctrl+K (uppercase)
# conditional clear screen, do nothing if in vim
is_vim="isvim2 #{pane_tty}"
unbind K
bind K if-shell "$is_vim" "" "send-keys -R \; send-keys C-l \; clear-history"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
# run prefix+I to install plugins
run -b '~/.tmux/plugins/tpm/tpm'