-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
52 lines (40 loc) · 1.45 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
# set default shell
set-option -g default-shell /bin/zsh
# set color
set-option -g default-terminal screen-256color
set -g terminal-overrides 'xterm:colors=256'
# replace prefix bind C-b with C-q
set -g prefix C-q
unbind C-b
# statusbar settings
set-option -g status-left-length 90
set-option -g status-right-length 90
set-option -g status-bg "#000000"
set-option -g status-left "#{?client_prefix, #[fg=white][Prefix], } #[fg=white] Host:#h | #[fg=white]Session:#S | #[fg=white]Window:#W(#P) | #[fg=default]"
set-option -g status-right "#[fg=white] #(tmux-network)#[fg=white] %Y-%m-%d (%a) %H:%M:%S #[fg=default]"
# window settings
set-window-option -g mode-keys vi
# select pane with key binding like vim
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize pane with key binding like vim
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# set escape time for vim
set-option -s escape-time 0
# split window
bind | split-window -h
bind - split-window -v
# mouse control
set-option -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# scroll history
set -g history-limit 50000
# ctrl+c to send to clipboard
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
# ctrl+v to paste from clipboard
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"