-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
146 lines (113 loc) · 3.95 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
# TMUX CONFIG FILE
# Abinash
# Rebind the prefix from C-b to C-Space.
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
# Support 256 colors in the terminal emulator.
set -g default-terminal "screen-256color"
# Disable the delay between an escape key press and subsequent characters.
# This increases Vim responsiveness.
set -sg escape-time 0
# Set the base index for windows to 1 instead of 0.
set -g base-index 1
# Ring the bell if any background window rang a bell
set -g bell-action any
# Set the base index for panes to 1 instead of 0.
setw -g pane-base-index 1
# Scrollback limit.
set -g history-limit 10000
# Monitor window activity. Windows with activity are then highlighted in the
# status line.
setw -g monitor-activity on
# Prevent tmux from displaying "Activity in window X" messages.
set -g visual-activity off
# Enable vi keys.
set -g status-keys vi
setw -g mode-keys vi
# Pass xterm style keys
setw -g xterm-keys on
#------------------------------------------------------------------------------
# Key Binding.
#------------------------------------------------------------------------------
# Easily load the source file
bind r source-file ~/.tmux.conf
# Pane splitting.
bind \ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Create new window at the current path
bind c new-window -c "#{pane_current_path}"
# Kill
bind x kill-pane \; move-window -r\; setw automatic-rename
bind & kill-window \; move-window -r\; setw automatic-rename
# Move between windows
bind -n C-o select-window -t -1
bind -n C-p select-window -t +1
# bind -n C-> next-window
# bind -n C-< previous-window
# Select panes in a given window
# Cntrl-Left/Right : selected panes
# Cntrl-Up/Down : swap panes
# bind -n C-Left select-pane -t :.-
# bind -n C-Right select-pane -t :.+
# bind -n C-Up swap-pane -U
# bind -n C-Down swap-pane -D
bind -n C-Left select-pane -L
bind -n C-Right select-pane -R
bind -n C-Up select-pane -U
bind -n C-Down select-pane -D
# Resize
# Alt-Left/Right/Up/Down
bind -n M-Left resize-pane -L 5
bind -n M-Down resize-pane -D 5
bind -n M-Up resize-pane -U 5
bind -n M-Right resize-pane -R 5
# Do not display the original window's name when renaming it. This makes
# renaming faster since one does not need to first erase the original name.
bind , command-prompt -p "(rename-window '#W')" "rename-window '%%'"
# Make b start copy mode.
bind b copy-mode
# To start selection: Ctrl-Space + v
# To copy: y
# To paste in vim : p
# To paste else where : Command + v
bind -t vi-copy v begin-selection
bind -t vi-copy C-v rectangle-toggle
bind -t vi-copy y copy-pipe "xclip -filter -selection clipboard | xclip -selection primary"
# TODO: Toggle between mouse mode UPDATE
# set -g mouse on
# bind -n C-m set-window-option mouse
#------------------------------------------------------------------------------
# Styling.
#------------------------------------------------------------------------------
# Status line.
set -g status-fg white
set -g status-bg black
set -g status-left ""
set -g status-right "#{?pane_synchronized, #[bg=blue]SYNCHRONIZED#[default],} #S "
# Window list.
setw -g window-status-fg colour246 # grey
setw -g window-status-bg black
setw -g window-status-attr none
setw -g window-status-format "#[fg=colour172]#I#[fg=white] #W "
# Active window.
setw -g window-status-current-fg white
setw -g window-status-current-bg black
setw -g window-status-current-attr bright
setw -g window-status-current-format "#[fg=colour172]#I#[fg=white] #W#F"
# Window activity.
setw -g window-status-activity-fg colour246 # grey
setw -g window-status-activity-bg black
# Panes.
set -g pane-border-fg white
set -g pane-border-bg black
set -g pane-active-border-fg red
set -g pane-active-border-bg black
# Command/message line.
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# Status update interval.
set -g status-interval 60
# Make the window list appear at the left-hand side instead of at the center.
set -g status-justify left