forked from yous/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
84 lines (70 loc) · 2.41 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
# Default
set-option -g base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
set-option -g default-terminal "screen-256color"
set-option -g display-time 2000
set-option -g history-limit 50000
set-option -g set-titles on
# H: Host
# I: Current window index
# P: Current pane index
# S: Session name
# T: Current window title
# W: Current window name
# #: A literal '#'
set-option -g set-titles-string "#S: #T"
# Mac OS X fix for pbcopy, pbpaste and launchctl
set-option -g default-command "command -v reattach-to-user-namespace >/dev/null \
&& reattach-to-user-namespace -l $SHELL || $SHELL"
# Bindings
# Default prefix
unbind-key C-b
set-option -g prefix `
bind-key ` send-prefix
bind-key r source-file ~/.tmux.conf
# Windows splitting
bind-key v split-window -h
bind-key s split-window
# Windows with the current working directory
bind-key C new-window -c "#{pane_current_path}"
bind-key V split-window -h -c "#{pane_current_path}"
bind-key S split-window -c "#{pane_current_path}"
# Last window
bind-key a last-window
# Pane navigation
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Pane resizing
bind-key -r H resize-pane -L 5
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r L resize-pane -R 5
# Set status bar
set-option -g status-bg colour235
set-option -g status-fg green
set-option -g status-justify right
set-option -g status-left-bg colour235
set-option -g status-left "#I: #[fg=cyan]#h #[default]#W#{?client_prefix, #[reverse]<Prefix>#[noreverse],}"
# set-option -g status-left "#{window_index}: #[fg=cyan]#{host_short} #[default]#{window_name}"
set-option -g status-left-length 50
set-option -g status-right-bg colour235
set-option -g status-right-fg yellow
set-option -g status-right "[%Y-%m-%d %I:%M%p]"
set-window-option -g window-status-fg colour245
set-window-option -g window-status-current-fg cyan
set-window-option -g mode-keys vi
# Allows for faster key repetition
set-option -s escape-time 0
# Aggressive Resize
set-window-option -g aggressive-resize on
# TMUX plugin manager is compatible with tmux 1.9
# List of plugins and initialize TMUX plugin manager
# (keep this line at the very bottom of tmux.conf)
if-shell "[[ `tmux -V | awk '{print ($2 >= 1.9)}'` -eq 1 ]]" " \
set -g @plugin 'tmux-plugins/tpm' \; \
set -g @plugin 'tmux-plugins/tmux-yank' \; \
run-shell '~/.tmux/plugins/tpm/tpm' \; \
"