-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
101 lines (88 loc) · 2.77 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# .tmux.conf
#
# - Author: Lucy Park
# - Settings for tmux 2.1 (partly supports 1.8)
# - To use this conf from a custom location: `tmux -f /path/to/.tmux.conf
# Binds {{{
# Change prefix from C-b to C-a
unbind C-b
set-option -g prefix C-a
# To go to beginning of line with C-a + a
bind a send-prefix
# Last active window
unbind l
bind C-a last-window
# hsplit
unbind %
bind v split-window -h -c "#{pane_current_path}"
if-shell "[[ `tmux -V` == *1.8 ]]" \
'bind v split-window -h'
# vsplit
unbind '"'
bind s split-window -v -c "#{pane_current_path}"
if-shell "[[ `tmux -V` == *1.8 ]]" \
'bind s split-window -v'
# new window
bind c new-window -c "#{pane_current_path}"
if-shell "[[ `tmux -V` == *1.8 ]]" \
'bind c new-window -c "$PWD"'
bind e new-window -c "#{pane_current_path}" \; split-window -v \; split-window -v \; split-window -v \; select-layout even-horizontal
bind q confirm-before -p "Close window #W? (y/n)" kill-window
bind p display-panes
# Panes
bind up resize-pane -U 10
bind down resize-pane -D 10
bind left resize-pane -L 10
bind right resize-pane -R 10
bind space next-layout
unbind C-o
bind r rotate-window
bind tab select-pane -t:.+
bind h select-pane -L # left-pane
bind j select-pane -D # down-pane
bind k select-pane -U # up-pand
bind l select-pane -R # right-pane
bind y set-window-option synchronize-panes\; display-message "synchronize #{?pane_synchronized,on,off}"
# Titles {{{
set-window-option -g automatic-rename on
# }}}
# Options {{{
set-option -g base-index 1
set-option -g default-command "${SHELL}"
set-option -g display-time 8000
if-shell "[[ `tmux -V` == *1.8 ]]" \
'set -g mouse-select-pane on'
if-shell "[[ `tmux -V` == *2.* ]]" \
'set-option -g mouse on'
if-shell "[[ `tmux -V` == *2.8 ]]" \
'set-option -g pane-active-border-fg blue'
if-shell "[[ `tmux -V` == *2.8 ]]" \
'set-option -g pane-active-border-bg black'
set-option -g status-keys vi
set-option -g history-limit 8192
set-option -s escape-time 100
set-window-option -g pane-base-index 1
# }}}
# Status Bar {{{
set-option -g status-interval 1
set-option -g status-left '___'
set-option -g status-right "#T"
set-option -g status-justify left
set-option -g status-bg black
set-option -g status-fg white
set-option -g status-left-length 20
# }}}
# Colors {{{
set-window-option -g mode-keys vi
set-window-option -g monitor-activity off
if-shell "[[ `tmux -V` == *2.8 ]]" \
'set-window-option -g window-status-current-bg magenta'
if-shell "[[ `tmux -V` == *2.8 ]]" \
'set-window-option -g window-status-current-fg black'
if-shell "[[ `tmux -V` == *2.8 ]]" \
'set-window-option -g window-status-bg white'
if-shell "[[ `tmux -V` == *2.8 ]]" \
'set-window-option -g window-status-fg black'
set-window-option -g clock-mode-colour yellow
set-window-option -g clock-mode-style 24
# }}}