-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
executable file
·80 lines (60 loc) · 2.34 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
unbind %
# set up vertical and horizontal split keys to be pipe and minus respectively
bind | split-window -h
bind - split-window -v
# set mouse mode on
set -g mouse on
#revert to pre 2.1 scroll behaviour
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# scroll history
set -g history-limit 10000
# Use Alt-hjkl keys without prefix key to switch panes
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
bind -n C-Right next-window
bind -n C-Left previous-window
# use 'a' as a prefix instead of 'b'
set -g prefix C-a
# allow tmux to pass through control, alt and shift modifiers
unbind C-Left
unbind C-Right
set-window-option -g xterm-keys on
#set fish as default shell
set-option -g default-shell /usr/bin/fish
# enable 256 colors
set-option -g default-terminal "screen-256color"
# enable utf-8 on status bar
#set-option -g status on
#set-option -g status-utf8 on
#load airline bindings
source-file ~/.tmux-airline.conf
set-hook -g client-attached 'run-shell /bin/update_display.sh'
# Use vim keybindings in copy mode
# setw -g mode-keys vi
set-window-option -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send -X begin-selection
# bind-key -t vi-copy v begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
# unbind -t vi-copy Enter
unbind -T copy-mode-vi Enter
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# enable continuum
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
run-shell ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
run-shell ~/.tmux/plugins/tmux-continuum/continuum.tmux
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1