/
tmux.conf
124 lines (103 loc) · 3.99 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
set-option -g default-shell /bin/zsh
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
# Better prefix
set -g prefix C-a
unbind-key C-b
bind C-a send-prefix
# restore clearing screen
bind C-l send-keys 'C-l'
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X select-line
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy"
# Resize in smaller increments
bind -r M-h resize-pane -L 2
bind -r M-k resize-pane -U 2
bind -r M-j resize-pane -D 2
bind -r M-l resize-pane -R 2
# reload configs
unbind-key r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
unbind-key c # Unbind old create
bind-key c new-window -c "#{pane_current_path}" # Create current path
# 25% horizontal split
unbind ^T
bind ^T split-window -p 25 -c '#{pane_current_path}'
# 30% vertical split
unbind ^U
bind ^U split-window -h -p 30 -c '#{pane_current_path}'
# horizontal and vertical splits
unbind |
bind | split-window -h -c '#{pane_current_path}'
unbind _
bind _ split-window -v -c '#{pane_current_path}'
unbind Right
bind Right resize-pane -R 8
unbind Left
bind Left resize-pane -L 8
unbind Up
bind Up resize-pane -U 4
unbind Down
bind Down resize-pane -D 4
# zoom into current pane, repeating will unzoom
unbind +
bind + resize-pane -Z
# Set default terminal for colors
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ',xterm-256color:Tc'
set -g base-index 1 # 1 indexed, for keyboards
set -sg escape-time 0 # No escape time
set -g history-limit 10000 # More sane history limit
set -g renumber-windows on # Automatically renumber windows
set -g set-titles on # Report terminal title
set -g set-titles-string "#S - #W" # Terminal title format
set -g message-command-style fg='colour222',bg='colour238'
set -g message-style bg='colour0',fg='colour1'
set -g message-style bg='colour238',fg='colour222'
set -g pane-active-border-style fg='colour154'
set -g pane-border-style fg='colour238'
set -g status on
set -g status-interval 2
set -g status-justify 'centre'
set -g status-left 'none'
set -g status-left-length '100'
set -g status-position 'bottom'
set -g status-right 'none'
set -g status-right-length '100'
set -g status-style bg='colour235'
setw -g window-status-activity 'none'
setw -g window-status-activity-style bg='colour235',fg='colour154'
setw -g window-status-separator ''
setw -g window-status-style fg='colour121',bg='colour235'
set -g status-left '\
#[fg=colour232,bg=colour154] #S \
#[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]\
#[fg=colour222,bg=colour238] #W \
#[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]\
#[fg=colour121,bg=colour235] #(whoami) \
#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
set -g status-right '\
#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]\
#[fg=colour154,bg=colour235]\
#[fg=colour232,bg=colour154] \
#(TZ="$TIMEZONE" date +%%H:%%M) \
#(TZ="$TIMEZONE" date +%%a) \
#(TZ="$TIMEZONE" date +%%d) \
#(TZ="$TIMEZONE" date +%%b) \
#(TZ="$TIMEZONE" date +%%Y) \
#[fg=colour238,bg=colour154,nobold,nounderscore,noitalics]'
setw -g window-status-format '\
#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]\
#[default] #I #W \
#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
setw -g window-status-current-format '\
#[fg=colour235,bg=colour238,nobold,nounderscore,noitalics]\
#[fg=colour222,bg=colour238] #I #W #F \
#[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]'
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
run -b '~/.tmux/plugins/tpm/tpm'