-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
122 lines (89 loc) · 3.62 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
# Act like Vim
set-window-option -g mode-keys vi
# Automatic window rename
set-window-option -g automatic-rename
# 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 M-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n M-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n M-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n M-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -T copy-mode-vi M-h select-pane -L
bind-key -T copy-mode-vi M-j select-pane -D
bind-key -T copy-mode-vi M-k select-pane -U
bind-key -T copy-mode-vi M-l select-pane -R
# New window/pane opens the same path
bind c new-window -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
# Reload config file
bind r source-file /etc/tmux.conf
# vi-mode copy
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# Look good
set-option -g default-terminal "screen-256color"
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# set up layouts
# set main-pane-width 130
# Change cursor in vim to distinguish between insert and command mode
#set-option -g terminal-overrides '*88col*:colors=88,*256col*:colors=256,xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007:Cc=\E]12;%p1%s\007:Cr=\E]112\007:Cs=\E]50;CursorShape=%?%p1%{3}%<%t%{0}%e%p1%{2}%-%;%d\007'
# scrollback buffer size increase
set -g history-limit 50000
# C-b C-b will swap to last used window
bind-key C-b last-window
# Start tab numbering at 1
set -g base-index 1
# Allows for faster key repetition
set -s escape-time 0
# Highlight active pane
set-option -g pane-active-border-style fg=green
# Change cursor in vim to distinguish between insert and command mode
# Use in conjunciton with tmux-cursors.vim
set-option -g terminal-overrides '*88col*:colors=88,*256col*:colors=256,xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007:Cc=\E]12;%p1%s\007:Cr=\E]112\007:Cs=\E]50;CursorShape=%?%p1%{3}%<%t%{0}%e%p1%{2}%-%;%d\007'
# Status update interval
set -g status-interval 1
# Basic status bar colors
set-option -g status-style bg=colour235,fg=colour136
# Left side of status bar
set -g status-left-style bg=colour235,fg=green
set -g status-left-length 40
set -g status-left "#S #[fg=white]» #[fg=yellow]#I #[fg=cyan]#P"
# Right side of status bar
set -g status-right-style bg=colour235,fg=cyan
set -g status-right-length 40
set -g status-right "#H #[fg=white]« #[fg=yellow]%H:%M:%S #[fg=green]%d-%b-%y"
# Window status
set -g window-status-format " #I:#W#F "
set -g window-status-current-format " #I:#W#F "
# default window title colors
set-window-option -g window-status-style fg=colour244,bg=default
# Current window status
set-window-option -g window-status-current-style fg=colour166,bg=default
# Window with activity status
set -g window-status-activity-style bg=colour33,fg=black
# Window separator
set -g window-status-separator ""
# Window status alignment
set -g status-justify centre
# Pane border
set -g pane-border-style bg=default,fg=default
# Pane number indicator
set -g display-panes-colour default
set -g display-panes-active-colour default
# Clock mode
set -g clock-mode-colour red
set -g clock-mode-style 24
# Message
set -g message-style bg=default,fg=default
# Command message
set -g message-command-style bg=default,fg=default
# Mode
set -g mode-style bg=red,fg=default
# Gapless window indexes
set -g renumber-windows on
set -g default-shell /usr/bin/zsh