-
Notifications
You must be signed in to change notification settings - Fork 4
/
.tmux.conf
176 lines (133 loc) · 5.13 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# Remove existing binding for C-Space
unbind-key -Tcopy-mode C-Space
# Remap prefix to C-Space
unbind C-b
set -g prefix C-Space
bind-key C-Space send-prefix
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set-option -g visual-activity on
set-window-option -g monitor-activity on
set -g default-terminal "xterm-kitty"
set -as terminal-features ",xterm-kitty:RGB"
# No bells at all
set -g bell-action none
set -g history-limit 50000
set -sg escape-time 0
setw -g mode-keys vi
set -g status-keys vi
bind P paste-buffer
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle
bind b copy-mode
unbind c
bind c command-prompt -p "Name of new window: " "new-window -n '%%' -c \"#{pane_current_path}\""
unbind r
bind r source-file ~/.tmux.conf \; display-message "Config reloaded.."
set -g mouse on
setw -g xterm-keys on
# Start copy mode when scrolling up and exit when scrolling down to bottom.
# The "#{mouse_any_flag}" check just sends scrolls to any program running that has
# mouse support (like vim)
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
set -g focus-events on
setw -g automatic-rename on
set -g allow-rename off
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
setw -g aggressive-resize on
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
bind M-h resize-pane -L
bind M-j resize-pane -D
bind M-k resize-pane -U
bind M-l resize-pane -R
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind -n M-Left select-pane -L
bind -n M-Right select-pane -D
bind -n M-Up select-pane -U
bind -n M-Down select-pane -R
bind -n S-Left previous-window
bind -n S-Right next-window
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
bind , command-prompt -p "(rename-window '#W')" "rename-window '%%'"
bind '$' command-prompt -p "(rename-session '#S')" "rename-session '%%'"
bind S set synchronize-panes
set-option -g status on
set-option -g status-position bottom
set -g status-style default
# Update interval
set -g status-interval 1
# Status bar colors
COLOR_WHITE='##FAFAFA'
COLOR_BASE0='#151a1e'
COLOR_BASE1='#1c2328'
COLOR_BASE2='#232b32'
COLOR_BASE3='#2a343c'
COLOR_BASE4='#313d46'
COLOR_BASE5='#384550'
COLOR_BASE6='#3f4e5a'
COLOR_BASE7='#465764'
COLOR_RED='#FF3333'
COLOR_ORANGE='#FF8F40'
COLOR_YELLOW='#FFB454'
COLOR_MAGENTA='#D4BFFF'
COLOR_VIOLET='#A37ACC'
COLOR_BLUE='#36A3D9'
COLOR_CYAN='#95E6CB'
COLOR_GREEN='#B8CC52'
COLOR_GREEN_LIGHT='#BAE67E'
COLOR_DARK_CONTRAST='#707A8C'
set -g status-style fg=$COLOR_BLUE,bg=$COLOR_BASE0
# Left status bar
set -g status-left-length 40
set -g status-left "#{?client_prefix,#[fg=$COLOR_BASE6]#[bg=$COLOR_ORANGE]#[bold] #S #[fg=$COLOR_ORANGE]#[bg=$COLOR_BASE1],#[fg=$COLOR_WHITE]#[bg=$COLOR_BLUE]#[bold] #S #[fg=$COLOR_BLUE]#[bg=$COLOR_BASE1]}"
# Right status bar
set -g status-right-length 100
set -g status-right "#[fg=$COLOR_BASE1,bg=$COLOR_BASE0]#[fg=$COLOR_VIOLET,bg=$COLOR_BASE1] %H:%M #[fg=$COLOR_BASE2,bg=$COLOR_BASE1]#[fg=$COLOR_DARK_CONTRAST,bg=$COLOR_BASE2,bold] #{session_attached} #{?synchronize-panes,#[fg=$COLOR_ORANGE]#[bg=$COLOR_BASE2]#[fg=$COLOR_BASE1]#[bg=$COLOR_ORANGE] SYNC #[bg=$COLOR_ORANGE],#[bg=$COLOR_BASE2]}#[fg=$COLOR_BLUE]#[fg=$COLOR_WHITE,bg=$COLOR_BLUE] #(whoami)@#[fg=$COLOR_WHITE,bg=$COLOR_BLUE,bold]#H "
# Window status
set-option -w -g window-status-format "#[fg=$COLOR_DARK_CONTRAST,bg=$COLOR_BASE0] #I#F #[fg=$COLOR_DARK_CONTRAST] #[fg=$COLOR_DARK_CONTRAST] #W "
set -g window-status-current-format "#[fg=$COLOR_BASE1,bg=$COLOR_GREEN_LIGHT]#[fg=$COLOR_BASE1,bg=$COLOR_GREEN_LIGHT] #I#F #W #[fg=$COLOR_GREEN_LIGHT,bg=$COLOR_BASE1,nobold]"
# Selected window status
set -g window-status-current-style fg=$COLOR_BASE1
# Last window status
#set -g window-status-last-format "#[fg=$COLOR_BASE1,bg=$COLOR_BASE1]#[fg=$COLOR_BASE7,bg=$COLOR_BASE1] #I#F #W #[fg=$COLOR_BASE0,bg=$COLOR_BASE0,nobold]"
# Window activity status
set -g window-status-activity-style fg=$COLOR_YELLOW,bg=$COLOR_BASE2
# Window default colors
set-option -w -g window-status-style fg=$COLOR_BASE7,bg=$COLOR_BASE1,dim
# Window separator
set -g window-status-separator ""
# Window status alignment
set -g status-justify left
# Pane border
set -g pane-border-style fg=$COLOR_BASE1,bg=$COLOR_BASE0
# Active pane border
set -g pane-active-border-style fg=$COLOR_BLUE,bg=$COLOR_BASE0
# Pane number indicator
set -g display-panes-colour $COLOR_BASE0
set -g display-panes-active-colour $COLOR_BASE2
# Clock mode
set -g clock-mode-colour $COLOR_MAGENTA
set -g clock-mode-style 24
# Message
set -g message-style fg=$COLOR_GREEN,bg=$COLOR_BASE0
# Command message
set -g message-command-style fg=$COLOR_GREEN,bg=$COLOR_BASE0
# Mode
set -g mode-style fg=$COLOR_GREEN,bg=$COLOR_BASE0
set -g @shell-mode 'vi'
if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-osx.conf'