-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtmux.conf
111 lines (81 loc) · 3.24 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
99
100
101
102
103
104
105
106
107
108
109
110
111
# Options {{{ -----------------------------------------------------------------
set-option -g prefix ^a
bind-key ^b send-prefix
set-option -g base-index 1
set-option -g default-terminal 'xterm-256color'
set-option -g status-keys 'vi'
set-window-option -g mode-keys 'vi'
set-window-option -g xterm-keys on
set -g mouse on
set-option -g set-titles on
set-option -g set-titles-string "#T"
set-window-option -g aggressive-resize on
set-option -g pane-border-fg '#222222'
set-option -g pane-border-bg '#222222'
set-option -g pane-active-border-fg '#222222'
set-option -g pane-active-border-bg '#222222'
set-option -s escape-time 0
set-option -ga update-environment ' AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY'
set-option -g renumber-windows on
set-option -g history-limit 10000
set-option -ga terminal-overrides ",xterm-256color:Tc"
set-option -g window-style 'fg=white,bg=#000000'
set-option -g window-active-style 'fg=white,bg=#282828'
set-option -g focus-events on
# }}}
# Status line {{{ -------------------------------------------------------------
set-option -g status-fg white
set-option -g status-fg white
set-option -g status-bg colour236
set-option -g status-left ''
set-option -g status-right '[#S] [#(cut -d" " -f1-3 /proc/loadavg)]'
set-window-option -g window-status-format ' #F#I:#W '
set-window-option -g window-status-current-format ' #F#I:#W '
set-window-option -g window-status-current-fg black
set-window-option -g window-status-current-bg colour112
# }}}
# Key bindings {{{ ------------------------------------------------------------
bind-key b send-prefix
bind-key a last-window
bind-key ^a last-window
bind-key -r C-h swap-window -t:-
bind-key -r C-s swap-window -t:+
bind-key -n M-h previous-window
bind-key -n M-s next-window
# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-t if-shell "$is_vim" "send-keys C-t" "select-pane -D"
bind -n C-n if-shell "$is_vim" "send-keys C-n" "select-pane -U"
bind -n C-s if-shell "$is_vim" "send-keys C-s" "select-pane -R"
#bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key n select-pane -t:.-
bind-key t select-pane -t:.+
bind-key -r C-n select-pane -t:.-
bind-key -r C-t select-pane -t:.+
bind-key -n C-M-n select-pane -t:.-
bind-key -n C-M-t select-pane -t:.+
bind-key c new-window -c "#{pane_current_path}"
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -c "#{pane_current_path}"
bind-key -n ^_ detach-client
bind-key r source-file ~/.tmux.conf
bind-key p paste-buffer
bind-key P run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
bind-key y run "tmux show-buffer | xclip -i"
bind-key ` copy-mode
bind-key Space copy-mode
bind-key C-Space copy-mode
bind-key -t 'vi-copy' t cursor-down
bind-key -t 'vi-copy' n cursor-up
bind-key -t 'vi-copy' h cursor-left
bind-key -t 'vi-copy' s cursor-right
bind-key -t 'vi-copy' v begin-selection
bind-key -t 'vi-copy' y copy-selection
bind-key -t 'vi-choice' t down
bind-key -t 'vi-choice' n up
# }}}
# Startup commands {{{ --------------------------------------------------------
# }}}