-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
77 lines (59 loc) · 2.5 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
# Change prefix key C-b to C-x
set-option -g prefix C-x
bind-key C-x send-prefix
unbind-key C-b
# Use 256-color
set-option -g default-terminal "screen-256color"
set-option -g terminal-overrides "xterm:colors=256"
set -g default-command "tmux-login-shell"
# status bar
set-option -g status-position top
set-option -g status-interval 1
set-option -g status-justify centre
set-window-option -g status-style fg=black,bg=colour39
set-window-option -g window-status-current-format " #I: #W "
set-window-option -g window-status-current-style fg=white,bg=colour21
set-option -g status-left-length 60
set-option -g status-right-length 60
set-option -g status-left "#[bg=colour021,fg=colour015] Host:#h #[bg=colour027,fg=colour015] Session:#S #[bg=colour033,fg=colour015] Window:#W(#P) #[bg=default,fg=default]"
set-option -g status-right "#(tmux-network)#(tmux-battery)#[bg=colour021,fg=colour015] %Y-%m-%d (%a) %H:%M:%S #[bg=default,fg=default]"
set-option -g pane-border-style fg=white,bg=black
set-option -g pane-active-border-style fg=colour39,bg=black
# mouse settings
set-option -g mouse on
# reduce delay of key stroke
set-option -sg escape-time 0
set-option -g history-limit 10000
set-window-option -g mode-keys vi
if-shell "which putclip" '\
bind-key -T copy-mode-vi v send-keys -X begin-selection; \
bind-key -T copy-mode-vi y send-keys -X copy-pipe "cat > /dev/clipboard"; \
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe "cat > /dev/clipboard"; \
'
if-shell "which reattach-to-user-namespace" '\
bind-key -T copy-mode-vi v send-keys -X begin-selection; \
bind-key -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"; \
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"; \
'
# split windows
bind-key / split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
# move panes
bind-key C-h select-pane -L
bind-key C-j select-pane -D
bind-key C-k select-pane -U
bind-key C-l select-pane -R
# move windows
bind-key C-t new-window -c "#{pane_current_path}"
bind-key C-n next-window
bind-key C-p previous-window
# move sessions
bind-key C-s new-session
bind-key C-x choose-session
bind-key C-w choose-tree
# rename
bind-key . command-prompt -I "#S" "rename-session -- '%%'"
bind-key , command-prompt -I "#W" "rename-window -- '%%'"
bind-key > command-prompt -p "Session name >" "run-shell 'cd #{pane_current_path} \; tmux-session-name %%'"
# reload .tmux.conf
bind-key r source-file ~/.tmux.conf \; display "Reloaded!"