-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_tmux.conf
80 lines (58 loc) · 2.59 KB
/
dot_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
# vim: ft=tmux
setw -g mode-keys vi
set -g default-terminal "screen-256color"
unbind C-b
set -g prefix C-f
# bind z send-keys C-z
# bind C-z last-window
# Reload config
bind R source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# Window management
bind | split-window -h # horizontal
bind - split-window -v # vertical
bind h select-pane -L
bind l select-pane -R
bind j select-pane -D
bind k select-pane -U
bind ` select-window -t 0
# TODO: Figure out how to pass option key to alt on mac
# switch panes using Alt-arrow without prefix
# bind -n M-Left select-pane -L
# bind -n M-Right select-pane -R
# bind -n M-Up select-pane -U
# bind -n M-Down select-pane -D
set -sg escape-time 0
# Scrollback buffer size increase
set -g history-limit 100000
# Use up and down arrows for temporary "maximize"
unbind Up; bind Up resize-pane -Z; unbind Down; bind Down resize-pane -Z
# Copy/paste interop
bind C-c run "tmux show-buffer | reattach-to-user-namespace pbcopy"
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi V send-keys -X rectangle-toggle
bind -T copy-mode-vi Enter send-keys -X copy-pipe 'reattach-to-user-namespace pbcopy' \; send -X clear-selection
set-option -g -q mouse on
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down
bind-key -T copy-mode C-w send-keys -X copy-selection
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection
bind-key -T copy-mode M-w send-keys -X copy-selection
bind-key -T copy-mode-vi C-j send-keys -X copy-selection
bind-key -T copy-mode-vi Enter send-keys -X copy-selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection
# Clear pane
bind C-k send-keys -R \; clear-history
unbind Space
bind Space split-window \; select-layout main-vertical \; swap-pane -U
# status line
set -g status-left-length 30
set -g status-right " #H | %I:%M %m/%d "
set -g status-left "#[fg=colour255,bg=colour57] #S #[bg=colour255] "
set -g status-style fg=colour57,bg=colour255
set -g pane-active-border-style fg=colour57
if-shell '[[ -e ~/.tmux.conf.local ]]' 'source-file ~/.tmux.conf.local'
set-option -g default-command "arch -arch arm64 /bin/zsh"