-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
127 lines (92 loc) · 4.02 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#
# modified by: Di Wen<[email protected]>
# modified at: June 21, 2016
#
# ==================== Base ====================
set -g prefix ^a
unbind ^b
bind a send-prefix
set -g base-index 1
set -g default-terminal "screen-256color"
# Add true color support for tmux
# https://bruinsslot.jp/post/how-to-enable-true-color-for-neovim-tmux-and-gnome-terminal
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Fix vim clipboard usage in tmux
# set -g default-command "reattach-to-user-namespace -l ${SHELL}"
# set -g default-shell "/usr/local/bin/fish"
# set -g mouse on
# bind-key -T copy-mode-vi DoubleClick1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# bind-key -T copy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy"
# To prevent c-d existing from shell
set-environment -g 'IGNOREEOF' 3
# ==================== Statusbar ====================
set -g status-interval 5
set -g status-bg black
set -g status-fg yellow
set -g status-left-length 32
set -g status-left "#[fg=cyan]:#[fg=blue]: #[fg=red][ #[fg=green]#S #[fg=red]]#[default]"
set -g status-justify centre
set -g window-status-format '#[fg=blue,bold]#I #W#[default] '
set -g window-status-current-format '#[fg=blue,bold,reverse]#I #W#[default] '
set -g status-right-length 60
set -g status-right "#[fg=red]( #[fg=green]#h #[fg=red]) #[fg=red][ #[fg=green]%H:%M #[fg=cyan]%a #[fg=blue]%m-%d #[fg=red]] #[fg=blue]:#[fg=cyan]:#[default]"
# ==================== Plugins ====================
# == Tmux Plugin Manager
set -g @plugin 'tmux-plugins/tpm'
# == Basic tmux settings everyone can agree on
set -g @plugin 'tmux-plugins/tmux-sensible'
# == Persists tmux environment across system restarts.
#
# prefix + c-s - save
# prefix + c-r - restore
set -g @plugin 'tmux-plugins/tmux-resurrect'
# == Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on.
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '60'
# == Tmux plugin for copying to system clipboard.
#
# prefix + y - copy selection to system clipboard
# prefix + Y - "put" selection - equivalent to copying a selection, and pasting it to the command line
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @shell_mode 'vi'
# == Tmux key bindings for quick opening of a highlighted file or url. In tmux copy mode:
#
# prefix + o - "open" a highlighted selection with the system default program. open for OS X or xdg-open for Linux.
# prefix + c-o - open a highlighted selection with the $EDITOR
set -g @plugin 'tmux-plugins/tmux-open'
# == A sidebar with the directory tree for the current path. Tries to make tmux more IDE like.
#
# prefix + Tab - toggle sidebar with a directory tree
# prefix + Backspace - toggle sidebar and move cursor to it (focus it)
# set -g @plugin 'tmux-plugins/tmux-sidebar'
# == Standard pane key-bindings for tmux
set -g @plugin 'tmux-plugins/tmux-pain-control'
set-option -g @pane_resize "10"
# == Quickly open urls on your terminal screen!
#
# prefix + U - use fzf to search and open URLS
set -g @plugin 'wfxr/tmux-fzf-url'
# == Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# ==================== Bindings ====================
# Override tmux-pain-control key-bindings
bind ^k resizep -U 10
bind ^j resizep -D 10
bind ^h resizep -L 10
bind ^l resizep -R 10
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
bind '\' last
bind q killp
bind ` splitw htop
bind m command-prompt "splitw 'exec man %%'"
bind / command-prompt "splitw '%%'"
# Update choose-tree to sort session by name
bind s choose-tree -swZ -O name
# maximize current pane
# bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D'
# toggle mouse
# bind m run "cut -c3- ~/.tmux.conf | sh -s _toggle_mouse"
# To enable true colors
# https://chris.chowie.net/2015/04/19/True-colour-with-neovim-tmux-and-iterm2/