-
Notifications
You must be signed in to change notification settings - Fork 4
/
tmux.conf
93 lines (73 loc) · 2.55 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
# increase buffer size
set-option -g history-limit 256000
# ctrl+space as prefix
unbind-key C-space
set-option -g prefix C-space
bind-key C-space send-prefix
# vim key buffer navigation
setw -g mode-keys vi
# prefix+key bindings
bind-key c new-window -c '#{pane_current_path}'
bind-key S setw synchronize-panes
bind-key R source-file ~/.tmux.conf \; display-message "tmux config reloaded"
# visual horizontal( | ) and vertical ( - or \ ) window splitting mnemonic
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
bind \\ split-window -v -c '#{pane_current_path}'
# hjkl 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
# ctrl+hjkl pane resizing
bind-key C-h resize-pane -L 4
bind-key C-j resize-pane -D 4
bind-key C-k resize-pane -U 4
bind-key C-l resize-pane -R 4
# prefix+[ to enter scroll mode
# then vVy visual selection and yanking
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X rectangle-toggle
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Escape send -X cancel
# Window navigation to match vim-buffer navigation
bind-key tab next-window
bind-key ` previous-window
# Speedy escape
set -s escape-time 0
# enable focus events
set -g focus-events on
# Mouse pane focus
set -g mouse on
# window+pane indices skip 0 because of keyboard layout
set -g base-index 1
set -g pane-base-index 1
# renumber windows when one is closed
set -g renumber-windows on
# enable true color
set -g default-terminal "xterm-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
# palette colors
tm_primary="#89dceb"
tm_fg="#cdd6f4"
tm_bg="#1e1e2e"
# default statusbar colors
set-option -g status-style fg=$tm_fg,bg=$tm_bg,default
# default + active(current) window title colors
set-window-option -g window-status-format "#[fg=$tm_primary,dim]#I#[fg=$tm_primary,dim]:#[fg=$tm_fg,dim]#W"
set-window-option -g window-status-current-format "#[bg=$tm_bg,fg=$tm_primary]#I#[bg=$tm_bg,fg=$tm_primary]:#[fg=$tm_fg]#W"
# pane border
set-option -g pane-border-style fg=$tm_fg
set-option -g pane-active-border-style fg=$tm_primary
# message text
set-option -g message-style fg=$tm_bg,bg=$tm_primary
# pane number display
set-option -g display-panes-active-colour $tm_primary
set-option -g display-panes-colour $tm_fg
# status sections
session_name="#[fg=$tm_primary,dim]#S"
# status layout
set -g status-left-length 20
set -g status-left "$session_name"
set -g status-right-length 0
set -g status-right ""