-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
68 lines (51 loc) · 1.81 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
# general settings
set -g default-terminal "screen-256color"
set -g history-limit 20000
# change prefix
unbind C-b
set -g prefix C-t
# set parent terminal title to reflect current window in tmux session
set -g set-titles on
set -g set-titles-string '#I: #W'
# edit configuration and reload
bind C-e new-window -n 'tmux.conf' "sh -c '\${EDITOR:-vim} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display \"Config reloaded\"'"
# reload tmux configuration
bind C-r source-file ~/.tmux.conf \; display "Config reloaded"
# rename session and window
bind r command-prompt -I "#{window_name}" "rename-window '%%'"
bind R command-prompt -I "#{session_name}" "rename-session '%%'"
# panes
bind -n C-l select-pane -L
bind -n C-h select-pane -R
bind -n C-j select-pane -D
bind -n C-k select-pane -U
# windows
bind n new-window
bind N new-session
bind l next-window
bind h previous-window
# splits
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour232 fg=colour137 dim'
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour156] %h %d #[fg=colour233,bg=colour232] %H:%M'
# hide status bar on demand
bind C-s if -F '#{s/off//:status}' 'set status off' 'set status on'
# for tmux 2.1 and above
set -g mouse on
# set inactive/active window styles
set -g window-style 'fg=colour247,bg=colour234'
set -g window-active-style 'fg=colour250,bg=colour232'
# outline for active pane
setw -g pane-active-border-style "fg=colour156"
# kill pane/window/session
bind x kill-pane
bind X kill-window
bind C-x confirm-before -p "kill other windows? (y/n)" "kill-window -a"
bind Q confirm-before -p "kill-session #S? (y/n)" kill-session
# window segments in status line
setw -g window-status-separator " "