-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
98 lines (75 loc) · 3.18 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
# _ __ _ _ _ __ _ _
# | | / _(_) | | (_) / _(_) |
# | |_ _ __ ___ _ ___ __ ___ ___ _ __ | |_ _ __ _ _ _ _ __ __ _| |_ _ ___ _ __ | |_ _| | ___
# | __| '_ ` _ \| | | \ \/ / / __/ _ \| '_ \| _| |/ _` | | | | '__/ _` | __| |/ _ \| '_ \ | _| | |/ _ \
# | |_| | | | | | |_| |> < | (_| (_) | | | | | | | (_| | |_| | | | (_| | |_| | (_) | | | | | | | | | __/
# \__|_| |_| |_|\__,_/_/\_\ \___\___/|_| |_|_| |_|\__, |\__,_|_| \__,_|\__|_|\___/|_| |_| |_| |_|_|\___(_)
# __/ |
# |___/
#
# change prefix.
set -g prefix C-a
unbind C-b
# prefix for nested tmux session.
bind-key a send-prefix
# last-window
bind-key C-a last-window
# change base-index instead of 0.
set -g base-index 1
set -g pane-base-index 1
# reload configuration.
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# splitting panes
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# moving between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# Toggle synchronize-panes
bind C-s set-window-option synchronize-panes
# Move current window to the left or the right.
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
# scrollback buffer n lines
set -g history-limit 10000
# Set the default terminal mode to 256color mode
set -g default-terminal "screen-256color"
# tmux-powerline
set-option -g status on
set-option -g status-interval 2
#set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/dotfiles/zsh/lib/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/dotfiles/zsh/lib/tmux-powerline/powerline.sh right)"
# default shell
set-option -g default-shell /bin/zsh
# vim keybind in copy mode.
set-window-option -g mode-keys vi
source ~/dotfiles/zsh/lib/tmux-colors-solarized/tmuxcolors-256.conf
# pane colors
set -g pane-border-style "fg=blue bg=black"
set -g pane-active-border-style "fg=yellow bg=black"
set -g history-limit 10000
# pbcopy
#set-option -g default-command "reattach-to-user-namespace -l zsh"
#bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-c run "tmux save-buffer - | xclip -selection clipboard -i"
#bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
# mouse
# A workaround from https://github.com/tmux/tmux/issues/145
set -g mouse on
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
# https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed
set-option -sg escape-time 10
set-option -sa terminal-overrides ',xterm*:RGB'
# vim ft=sh