-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.tmux.conf
99 lines (77 loc) · 3.25 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
#
# Example .tmux.conf
# tmux 2.6
# By Nicholas Marriott. Public domain.
#
# Some tweaks to the status line
set -g status-bg green
set -g status-right "%H:%M"
set -g window-status-current-attr "underscore"
# No bells at all
set -g bell-action none
# Lock after 15 minutes
#set -g lock-after-time 1800
# Keep windows around after they exit
set -g remain-on-exit on
# Turn on xterm-keys so that additional function keys get escape sequences
set -g xterm-keys on
# Change the prefix key to C-a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Turn the mouse on, but without copy mode dragging
set -g mouse on
unbind -n MouseDrag1Pane
#unbind -temacs-copy MouseDrag1Pane
# Keys to toggle monitoring activity in a window, and synchronize-panes
#bind m set monitor-activity
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
# Keys to hide and show a window name from the status line
bind '-' set window-status-format '#I'\; set window-status-current-format '#I'
bind '+' set window-status-format '#I:#W#F'\; set window-status-current-format '#I:#W#F'
# split panes using | and -
bind | split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind - split-window -v -c '#{pane_current_path}' # Split panes horizontal
unbind '"'
unbind %
set-option -g history-limit 1000000
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
#tmux continumm and tmux ressucrect configuration and plugins
set -g @plugin '~/tmux-plugins/tmux-resurrect'
set -g @plugin '~/tmux-plugins/tmux-continuum'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-processes 'ssh psql mysql sqlite3 cf nano'
set -g @continuum-restore 'on'
###testing
set -g @continuum-save-interval '3'
# disable mouse control by default - change 'off' to 'on' to enable by default.
bind M set -g mouse on
bind m set -g mouse off
#copy paste without mouse
# Linux only copy paste in shell
set -g mouse on
##bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'sen$
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 clibboa$
# # 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 clip$
set -g mouse on
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run-shell ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
run '~/.tmux/plugins/tpm/tpm'