-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
87 lines (69 loc) · 2.54 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
# /etc/tmux.conf: In order to make tmux more confortable.
# improve colors
set -g default-terminal 'screen-256color'
#set -g default-terminal 'tmux-256color'
set-option -g status-position top
# act like vim, make <c-b>[ work more comfortable.
#+ press space to start, enter to end selection.
set -g status-keys vi
setw -g mode-keys vi
setw -g mode-mouse on
setw -g monitor-activity on
# Pane navigations.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# Pane rotations.
# Using c-b + {}
# Window navigations
bind-key C-b last-window
# Run command
bind C-e command-prompt -p "Command:" \
"run \"tmux list-panes -a -F '##{session_name}:##{window_index}.##{pane_index}' \
| xargs -I PANE tmux send-keys -t PANE '%1' Enter\""
# Window Placement, default styles
bind-key H select-layout even-horizontal
bind-key V select-layout even-vertical
bind-key O select-layout main-horizontal
bind-key E select-layout main-vertical
bind-key T select-layout tiled
# Remapping keys for myself
bind-key z resize-pane -Z
bind-key C-z detach-client
bind-key X confirm-before -p "kill-window #W? (y/n)" kill-window
bind-key \ confirm-before -p "kill-session #W? (y/n)" kill-session
bind-key | confirm-before -p "kill-server #W? (y/n)" kill-server
# Send same command to all opened windows in the same session.
#setw synchronize-panes on
# The client follow the leader to switch windows.
#lock-client
# This is intentionally comment out, may conflict with vim.
#set -g prefix2 C-s
# Automatically set window title
#set-window-option -g automatic-rename on
#set-option -g set-titles on
# start window numbers at 0, I think 0 is ok, can be changed to 1.
set -g base-index 0
set-window-option -g pane-base-index 0
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# soften status bar color from harsh green to light gray
set -g status-bg '#666666'
set -g status-fg '#aaaaaa'
# remove administrative debris (session name, hostname, time) in status bar
#set -g status-left ''
set -g status-right ''
# increase scrollback lines
set -g history-limit 100000
# prefix -> back-one-character
#bind-key C-b send-prefix
# prefix-2 -> forward-incremental-history-search, this is intentionally comment
#+ out, becase may conflict with vim.
#bind-key C-s send-prefix -2
# Local config
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
# I am not using zsh.
#set-option -g default-command "reattach-to-user-namespace -l zsh"