-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
95 lines (77 loc) · 2.86 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
# Act like GNU screen
unbind C-b
set -g prefix C-a
# C-a C-a to jump to beginning of line
bind-key C-a send-prefix
# Bindings
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind-key -n M-Tab select-pane -t :.+
bind m command-prompt "split-window -h 'exec man %%'"
bind r source-file ~/.tmux.conf
bind-key & kill-window
bind-key x kill-pane
# Move windows to left or right
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
# Move window to pane
bind-key S choose-window 'join-pane -v -s "%%"'
bind-key V choose-window 'join-pane -h -s "%%"'
# Resize panes like Vim
bind-key -r < resize-pane -L 5
bind-key -r > resize-pane -R 5
bind-key -r - resize-pane -D 5
bind-key -r + resize-pane -U 5
# Layout bindings
bind-key -r Space next-layout
bind-key = select-layout even-vertical
bind-key | select-layout even-horizontal
# Clear current window name when renaming.
bind-key , command-prompt -p (rename-window) "rename-window '%%'"
# Increase time numbers are displayed to select a pane when using `<prefix> q`.
set -g display-panes-time 5000
# Use xclip to copy to the system clipboad as well.
bind-key -T copy-mode 'M-w' send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
# Similar but for use with Mac OS.
#bind-key -T copy-mode 'M-w' send-keys -X copy-pipe-and-cancel "pbcopy"
# Set highlight colour when in select (copy/paste mode)
set -g mode-style bg=white
# Status bar
set -g base-index 1
set -g status-style fg=white,bg=black
set -g message-style fg=white,bg=red,bright
set -g status-interval 10
set -g status-left "#[fg=white]#[bg=black] #S.#I.#P #[default]"
set -g status-right "#[fg=white]#[bg=black] %a %d %b %Y %H:%M #[default]"
set -g status-right-length 94
setw -g window-status-style bg=black
setw -g window-status-current-style fg=black,bg=white
# These are actually inverted for activity staus so:
# bg = foreground and fg = background
setw -g window-status-activity-style fg=black,bg=yellow
setw -g monitor-activity on
# Scrollback buffer n lines
set -g history-limit 10240
# General options
set -g default-terminal screen-256color
set -g status-keys vi
set -g bell-action none
set -g visual-bell off
set -g set-titles on
set -g set-titles-string '#S.#I.#P #W #T' # session.windowindex.paneindex windowname windowtitle
set -g renumber-windows on # renumber windows sequentially after closing any of them
# Scrolling with Shift-PageUp/Shift-PageDown
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# No time between C-a and command
set -sg escape-time 0
# Window options
setw -g mode-keys emacs
setw -g aggressive-resize on
setw -g monitor-activity on
# Disable auto renaming
setw -g automatic-rename off
setw -g alternate-screen on