-
Notifications
You must be signed in to change notification settings - Fork 4
/
.tmux.conf
85 lines (70 loc) · 2.33 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
set -g default-terminal "screen-256color"
# screen-like keybindings
unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind a send-prefix
bind A command-prompt "rename-window %%"
setw -g automatic-rename off
bind Escape copy-mode
# default is too slow
set -s escape-time 100
# vi-keys
setw -g mode-keys vi
set -g status-keys vi
setw -g xterm-keys on
# moving between panes and windows
bind C-a last-window
bind " " next-window
bind BSpace previous-window
bind '"' choose-window
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind H command-prompt "resize-pane -L %1"
bind J command-prompt "resize-pane -D %1"
bind K command-prompt "resize-pane -U %1"
bind L command-prompt "resize-pane -R %1"
bind s command-prompt "swap-window -t %1"
bind S command-prompt "move-window -r -t %1"
bind U swap-pane -U
# splits
bind n new-window -c "#{pane_current_path}"
bind = split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind r next-layout
bind R previous-layout
bind T command-prompt -p "Select layout (main|even|tiled)-(hor|vert):" "select-layout %%"
bind p command-prompt -p "put pane into:" "join-pane -t '%%'"
bind P command-prompt -p "pull pane from:" "join-pane -s '%%'"
# maximizing and restoring panes.
bind x resize-pane -Z
# scrollback buffer
set -g history-limit 100000
bind C-l clear-history\; display-message "History cleared."
# read and write and delete paste buffer
bind > choose-buffer \
'run "tmux save-buffer -b %% - | xclip -i -select clipboard"'
bind < run 'xclip -o -selection clipboard | tmux load-buffer -'
bind + command-prompt "delete-buffer -b %1"
# toggle activity/silence monitoring
bind m setw monitor-activity\; display-message "Watching for activity."
bind M command-prompt -p "monitor-silence (seconds)" "setw monitor-silence %%"
# set xterm window status
set-option -g set-titles on
set-option -g set-titles-string '#H ###I.#P #W (#S)'
set-option -g allow-rename off
# colors
set -g status-bg black
set -g status-fg white
set -g window-style 'fg=colour250,bg=colour235'
set -g window-active-style 'fg=colour251,bg=colour234'
# status bar
set -g status-right-length 50
set -g status-right "#[fg=cyan]%Y-%m-%d #[fg=green]%H:%M #[default]"
# allow mouse
set -g mouse on
# set focus events for vim plugins
set -g focus-events on
set-option -g display-time 5000