-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion3.tmux.conf
More file actions
120 lines (93 loc) · 3.75 KB
/
Copy pathversion3.tmux.conf
File metadata and controls
120 lines (93 loc) · 3.75 KB
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
#############################
# TMUX CONF FOR VERSION: 3.2a
#############################
# Vim keys
set -g mode-keys vi
set -g status-keys vi
set-window-option -g mode-keys vi
# to prevent ssh from renaming window name
set-option -g allow-rename off
# enable mouse
set -g mouse on
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# increase scrollback buffer size
set -g history-limit 100000
# tmux messages are displayed for 2 seconds
set -g display-time 2000
# focus events enabled for terminals that support them
set -g focus-events on
# super useful when using "grouped sessions" and multi-monitor setup
setw -g aggressive-resize on
# start window numbering at 1
set -g base-index 1
# Set parent terminal title to reflect current window in tmux session
set -g set-titles on
set -g set-titles-string "#I:#W [#P:#{pane_current_command}]"
# automatically renumber windows
set -g renumber-windows on
##############
# NAVIGATION #
##############
# clear screen and scroll history by simply pressing Ctrl+K
# -n allows it to run without needing of prefix key
bind -n C-k send-keys -R \; send-keys C-l \; clear-history
# Vim keys for pane nav:
bind -r h select-pane -L
bind -r l select-pane -R
bind -r k select-pane -U
bind -r j select-pane -D
# Remap pane/window splitting to use current pane path
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Additional sane pane splitting shortcut
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -c "#{pane_current_path}"
# M-Enter to zoom pane
bind -n M-Enter resize-pane -Z
# source .tmux.conf as suggested in `man tmux` - reload source by prefix+R or Ctrl+Alt+R
bind r source-file ~/.tmux.conf \; display " Reloaded tmux.conf"
bind -n C-M-r source-file ~/.tmux.conf \; display " Reloaded tmux.conf"
# bind prefix+0 to select last window instead of window 0
bind 0 select-window -t:$
# bind M-(number) to select window without having to use prefix
# also bind M-0 to select last window
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
bind -n M-0 select-window -t:$
# Capture pane content and store it into `/tmux.log
bind-key S capture-pane -b temp-capture-buffer -S - \; save-buffer -b temp-capture-buffer ~/tmux.log \; delete-buffer -b temp-capture-buffer \; display " Pane content stored at ~/tmux.log"
######
# ui #
######
set -g default-terminal "screen-256color"
# modes
setw -g clock-mode-colour colour5
setw -g mode-style 'fg=colour1 bg=colour18 bold'
# panes
set -g pane-border-style 'fg=colour244 bg=colour235'
set -g pane-active-border-style 'fg=colour77 bg=colour235'
set -g pane-border-format ' [#P] <#{pane_current_command}> @ #{pane_current_path} #{?window_zoomed_flag,#[fg=colour228]Z#[fg=colour77] ,}'
set -g pane-border-status 'top'
# statusbar
set -g status-style 'bg=colour234 fg=colour250'
set -g status-left '#[fg=colour228,bg=colour234] #S ' # sesion name
set -g status-right '#[fg=colour250,bg=colour236] %d %b %H:%M ' # date/clock
set -g status-right-length 50
set -g status-left-length 50
setw -g window-status-current-style 'fg=colour1 bg=colour28 bold'
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour250]#F '
setw -g window-status-style 'fg=colour9 bg=colour236'
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
setw -g window-status-separator ''
# messages
set -g message-style 'fg=colour237 bg=colour3 bold'