/
.tmux.conf
85 lines (63 loc) · 2.28 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
# File: ~/.tmux.conf
# {{{ Options
set -g default-terminal "tmux-256color"
set -g history-limit 100000
set -g base-index 1
setw -g pane-base-index 1
setw -g monitor-activity on
set -g set-titles on
set -g set-titles-string '#T'
# fix vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# focus events on for terminals that support them
set -g focus-events on
# {{{ Status bar
# tmux messages are displayed for 2 seconds
set -g display-time 2000
set -g status-style "bg=#000000 fg=#ffffd7"
set -g status-right ' (#(cut -d " " -f -3 /proc/loadavg)) %a %F %R '
set -g status-right-length 50
set -g window-status-format ' #W '
set -g window-status-current-format ' #W '
setw -g window-status-activity-style none
setw -g window-status-bell-style "fg=#ff0000 bold"
setw -g window-status-current-style "reverse"
# }}}
setw -g aggressive-resize on
set -g renumber-windows on
# Enable mouse support
set -gq mouse on
# }}}
# {{{ Keybindings
# Better horizontal and vertical panes
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
# emacs keys are probably better when editing single lines
set -g status-keys emacs
setw -g mode-keys vi
unbind C-b
set -g prefix C-k
bind C-k send-prefix
bind r source-file ~/.tmux.conf
# move windows one to the left/right
bind -r "<" swap-window -t -1 -d
bind -r ">" swap-window -t +1 -d
bind -n PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
bind -n NPage if-shell -F "#{alternate_on}" "send-keys NPage" "copy-mode -e; send-keys NPage"
bind -n WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind -n WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
bind C-s if -F '#{pane_synchronized}' \
'setw synchronize-panes off; \
setw pane-active-border-style "fg=#00ff00"' \
'setw synchronize-panes on; \
setw pane-active-border-style "fg=#ff0000"'
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i --clipboard"
# {{{ Panes
# vim-like keybindings for moving between panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# }}}
# }}}
# vim: foldmethod=marker foldlevel=0