-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.tmux.conf
75 lines (63 loc) · 2.3 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
# required for colors and "special" font weights
# set -g default-terminal "tmux-256color"
set-window-option -g xterm-keys on
set -g history-limit 25000
# use control a for prefix
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# easier split windows
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %
# easier config reloads
bind r source-file ~/.tmux.conf
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
# tmuxinator window names stick
set-option -g allow-rename off
# neovim escape delay fix
set -sg escape-time 0
# 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?|emacs)(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-\\" if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
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-\\" select-pane -l
# Alt + vim keys to resize panes
bind-key -n M-h resize-pane -L
bind-key -n M-j resize-pane -D
bind-key -n M-k resize-pane -U
bind-key -n M-l resize-pane -R
# Control + Alt + vim keys to resize panes faster
bind-key -n C-M-h resize-pane -L 10
bind-key -n C-M-j resize-pane -D 10
bind-key -n C-M-k resize-pane -U 10
bind-key -n C-M-l resize-pane -R 10
white='#f8f8f2'
gray='#44475a'
dark_gray='#282a36'
light_purple='#bd93f9'
dark_purple='#6272a4'
cyan='#8be9fd'
green='#50fa7b'
orange='#ffb86c'
red='#ff5555'
pink='#ff79c6'
yellow='#f1fa8c'
set -g pane-active-border-style "fg=${dark_purple}"
set -g pane-border-style "fg=${gray}"
set -g message-style "bg=${gray},fg=${white}"
set -g status-style "bg=${gray},fg=${white}"
# set -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} ${left_icon}"
set -g window-status-current-format "#[fg=${white},bg=${dark_purple}] #I #W${current_flags}"