-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
57 lines (45 loc) · 2.1 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
set-option -g prefix C-a
set-option -g default-shell /nix/store/vs8k59bblhm8q6nha0flmk330jcagfh5-zsh-5.9/bin/zsh
set -g base-index 1
setw -g pane-base-index 1
# TODO TEST THE ESCAPE TIME
set -s escape-time 1
set -g history-limit 50000
set-option -g mouse on
set -g status-justify left
set -g status-right '#(date +%%H:%%M) '
# from https://github.com/NHDaly/tmux-better-mouse-mode
set -g @scroll-speed-num-lines-per-scroll "1"
# disable "release mouse drag to copy and exit copy-mode", ref: https://github.com/tmux/tmux/issues/140
unbind-key -T copy-mode-vi MouseDragEnd1Pane
# since MouseDragEnd1Pane neither exit copy-mode nor clear selection now,
# let single click do selection clearing for us.
bind-key -T copy-mode-vi MouseDown1Pane select-pane\; send-keys -X clear-selection
# this line changes the default binding of MouseDrag1Pane, the only difference
# is that we use `copy-mode -eM` instead of `copy-mode -M`, so that WheelDownPane
# can trigger copy-mode to exit when copy-mode is entered by MouseDrag1Pane
bind -n MouseDrag1Pane if -Ft= '#{mouse_any_flag}' 'if -Ft= \"#{pane_in_mode}\" \"copy-mode -eM\" \"send-keys -M\"' 'copy-mode -eM'
set -g @yank_action 'copy-pipe'
########## UI ##########
set -g default-terminal "screen-256color" # colors!
set -g @themepack 'basic'
########## BINDINGS ##########
bind j resize-pane -D 10
bind k resize-pane -U 10
bind h resize-pane -L 10
bind l resize-pane -R 10
bind-key C-a last-window
bind-key R source-file ~/.tmux.conf; display-message "~/.tmux.conf is reloaded"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
########## PLUGINS ##########
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'tmux-plugins/tmux-yank'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'