-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
75 lines (63 loc) · 2.74 KB
/
dot_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
# Tmux settings
# Set XTerm key bindings
setw -g xterm-keys on
# Set colors
set-option -g default-terminal "screen-256color"
# Configure escape vim for Neovim.
# https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed
set-option -sg escape-time 10
# Set reload key to r
bind r source-file ~/.tmux.conf
# Count sessions start at 1
set -g base-index 1
# Use vim bindings
setw -g mode-keys vi
# Enable mouse in tmux. Note that this will interfere with mouse selection.
# In iterm2, hold down opt to enable normal mouse selection while mouse mode
# is on in tmux.
set -g mouse on
# Remap window navigation to vim
unbind-key j
bind-key j select-pane -D
unbind-key k
bind-key k select-pane -U
unbind-key h
bind-key h select-pane -L
unbind-key l
bind-key l select-pane -R
# Resize the current pane using Alt + direction
bind -n M-k resize-pane -U
bind -n M-j resize-pane -D
bind -n M-h resize-pane -L
bind -n M-l resize-pane -R
# Open new panes and windows in current directory.
bind '%' split-window -h -c '#{pane_current_path}'
bind '"' split-window -v -c '#{pane_current_path}'
bind c new-window -c '#{pane_current_path}'
# Tmux statusbar config (created by tmuxline.vim)
set -g status-justify "left"
set -g status "on"
set -g status-style "none"
set -g message-command-style "bg=colour31"
set -g status-left-length "100"
set -g pane-active-border-style "fg=colour254"
set -g status-bg "colour234"
set -g message-command-style "fg=colour231"
set -g pane-border-style "fg=colour240"
set -g message-style "bg=colour31"
set -g status-left-style "none"
set -g status-right-style "none"
set -g status-right-length "100"
set -g message-style "fg=colour231"
setw -g window-status-style "fg=colour250,bg=colour234,none"
setw -g window-status-activity-style "fg=colour250,bg=colour234,none"
setw -g window-status-separator ""
set -g status-left "#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour234,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=colour236,bg=colour234,nobold,nounderscore,noitalics]#[fg=colour247,bg=colour236] %Y-%m-%d %l:%M %p #[fg=colour252,bg=colour236,nobold,nounderscore,noitalics]#[fg=colour235,bg=colour252] #H "
setw -g window-status-format "#[fg=colour244,bg=colour234] #I #[fg=colour250,bg=colour234] #W#{?window_zoomed_flag,[Z],} "
setw -g window-status-current-format "#[fg=colour234,bg=colour31,nobold,nounderscore,noitalics]#[fg=colour117,bg=colour31] #I #[fg=colour231,bg=colour31,bold] #W#{?window_zoomed_flag,[Z],} #[fg=colour31,bg=colour234,nobold,nounderscore,noitalics]"
# end tmux statusbar config
# Enable pbcopy/pbpaste in tmux.
if-shell \
'test "$(uname -s)" = Darwin && type reattach-to-user-namespace > /dev/null' \
'set-option -g default-command "exec reattach-to-user-namespace -l zsh"'