forked from mscoutermarsh/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
81 lines (57 loc) · 2.42 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
# Bind escape to copy mode
unbind [
bind Escape copy-mode
# p = paste
unbind p
bind p paste-buffer
# no escape delay
set -sg escape-time 0
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Start window numbering at 1 (default => 0)
set -g base-index 1
set -g clock-mode-style 12
# Renumber windows after removing one
set -g renumber-windows on
# use 256 colors
set -g default-terminal "screen-256color"
# Keep plenty of history for scrollback
set -g history-limit 10000
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
bind-key -n 'C-Left' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-Down' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-Up' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-Right' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-Left' select-pane -L
bind-key -T copy-mode-vi 'C-Down' select-pane -D
bind-key -T copy-mode-vi 'C-Up' select-pane -U
bind-key -T copy-mode-vi 'C-Right' select-pane -R
# increase display time
set -g display-panes-time 1200
# more intuitive keybindings for splitting
bind '\' split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Keep window names as I set them
setw -g automatic-rename off
set -g status-interval 5
set -g status-style "bg=colour0"
set -g status-right ''
set -g status-left-length 20
set -g window-status-format '#[fg=colour244,bg=colour18,nobold,noitalics,nounderscore] #I| #[fg=colour1]#W '
set -g window-status-current-format '#[fg=colour231,bg=colour1] #I| #[fg=colour231,bg=colour1,bold]#W '
set -g status-left '#{?client_prefix,#[bg=colour1]#[fg=colour231]#[bold] #S ,#[bg=colour07]#[fg=colour18]#[bold] #S }#[bg=colour0] '