-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
86 lines (62 loc) · 2.2 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
# 256 color terminal
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# Set waiting time to 0 on typing escape key
set -s escape-time 0
# Set default shell
set -g default-shell $SHELL
# mouse
set -g mouse on
# Change window name to running command name
setw -g automatic-rename on
# Set 1 of starting number for windows
set -g base-index 1
# Set 1 of starting number for panes
set -g pane-base-index 1
# Retain 100,000 lines in the session
set -g history-limit 100000
# Use vim keybindings in copy mode
setw -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel -i --clipboard"
# Esc clears copy-selection (doesn't cancel copy-mode)
bind-key -T copy-mode-vi Escape send-keys -X clear-selection
# Ctrl-c cancels copy-selection and copy-mode
bind-key -T copy-mode-vi C-c send-keys -X cancel
# Clipboard settings for Mac (Override some settings)
if-shell 'uname | grep -q Darwin' 'bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy -i --clipboard"'
# status
set -g status-style fg=white,bg="colour235"
set -g status-left-length 120
set -g status-right-length 180
set -g status-left "#[fg=green,bold][Session: #S] #[default]"
set -g status-right '#[fg=blue,bold]#(cd #{pane_current_path} && dirs +0) #[fg=red](#(cd #{pane_current_path} && git rev-parse --abbrev-ref HEAD)) #[fg=green][%Y/%m/%d (%a) %H:%M] #[default]'
# window-status-current
setw -g window-status-current-style fg=black,bg=white
# pane-active-border
set -g pane-active-border-style fg=white,bg=black
# reload tmux.conf
unbind r
bind r source-file ~/.tmux.conf\; display-message "tmux reloaded"
# displays *
unbind *
bind * list-clients
# split window
bind s split-window -v
bind v split-window -h
# select page
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes
bind -r < resize-pane -L 1
bind -r > resize-pane -R 1
bind -r - resize-pane -D 1
bind -r + resize-pane -U 1
# synchronize panes
bind e setw synchronize-panes
# Plug-ins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
run '~/.tmux/plugins/tpm/tpm'