-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
106 lines (89 loc) · 4.74 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
## remap prefix to Control + a
#set -g prefix C-a
# bind-key 'C-a C-a' to type 'C-a'
#bind-key C-a send-prefix
#unbind-key C-b
#bind-key -n 'M-Left' select-pane -L
#bind-key -n 'M-Down' select-pane -D
#bind-key -n 'M-Up' select-pane -U
#bind-key -n 'M-Right' select-pane -R
#set-option default-terminal tmux
## Linux only
#set -g mouse on
#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
#bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
#bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
#bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
#bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
#bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
## To copy, left click and drag to highlight text in yellow,
## once you release left click yellow text will disappear and will automatically be available in clibboard
## # Use vim keybindings in copy mode
#setw -g mode-keys vi
## Update default binding of `Enter` to also use copy-pipe
#unbind -T copy-mode-vi Enter
##bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
##bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
#bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -b"
#bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel -i -b"
#----
set-option -g default-shell /usr/bin/zsh
set-option -g prefix `
set-option -g base-index 1
set-option -g pane-base-index 1
set-option -g renumber-windows on
set-option -g mode-keys vi
set-option -g aggressive-resize off
set-option -g mouse on
set-option -g pane-border-style bg=default,fg=default
set-option -g pane-active-border-style bg=default,fg=colour250
set-option -g window-status-current-style bg=default,fg=colour223,bold
set-option -g status-left-length 50
set-option -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
unbind-key C-b
unbind-key '"'
unbind-key %
#unbind-key -T copy-mode-vi MouseDragEnd1Pane
#unbind-key -T copy-mode-vi MouseDragEnd1Pane
#unbind-key MouseDown2Pane
bind-key ` send-prefix
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf sourced!"
bind-key h split-window -v
bind-key v split-window -h
#bind-key -n M-Up select-pane -U
#bind-key -n M-Left select-pane -L
#bind-key -n M-Down select-pane -D
#bind-key -n M-Right select-pane -R
unbind-key -T copy-mode-vi Enter
unbind-key -T copy-mode-vi MouseDragEnd1Pane
#bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
#bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -b"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel -i -b"
#bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
# would like to ctrl-c/v need to fix these
#bind-key C-c run "tmux save-buffer - | xclip -i -sel clipboard"
#bind-key C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
bind-key C-c run "tmux save-buffer - | xsel -i -b"
bind-key C-v run "tmux set-buffer \"$(xsel -o -b)\"; tmux paste-buffer"
##bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
##bind-key -n MouseDrag1Status swap-window -t=
##bind-key -n DoubleClick1Status new-window
# overidden by tmux-better-mouse-mode #bind-key -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'"
# overidden by tmux-better-mouse-mode #bind-key -n WheelDownPane select-pane -t= \; send-keys -M
bind-key -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind-key -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind-key -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind-key -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind-key -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
set-option -g @plugin 'tmux-plugins/tpm'
set-option -g @plugin 'nhdaly/tmux-better-mouse-mode'
set-option -g @plugin 'tmux-plugins/tmux-sensible'
set-option -g @plugin 'tmux-plugins/tmux-copycat'
set-option -g @plugin 'tmux-plugins/tmux-open'
# Todo breaks copy paste #set-option -g @plugin 'tmux-plugins/tmux-yank'
set-option -g @plugin 'tmux-plugins/tmux-resurrect'
#set-option -g @plugin 'tmux-plugins/tmux-continuum'
set-option -g @plugin 'tmux-plugins/tmux-prefix-highlight'
run -b '~/.tmux/plugins/tpm/tpm'