-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
79 lines (63 loc) · 2.42 KB
/
tmux.conf
File metadata and controls
79 lines (63 loc) · 2.42 KB
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
# command prefix (like screen)
set-option -g prefix C-a
#run-shell 'tmux setenv -g TMUX_VERSION $(tmux -V | sed -En "s/^tmux[^0-9]*([.0-9]+).*/\1/p")'
source-file ~/.tmux.conf.local
# use human based indexing
set-option -g base-index 1
bind-key T detach -a
# basic settings
set-option -g mouse on
set-option -g renumber-windows on
set-window-option -g mode-keys vi # vi key
# this next line must NOT specify SSH_AUTH_SOCK in order for the proceding line to work
set-environment -g SSH_AUTH_SOCK $HOME/.screen/ssh-auth-sock.$HOSTNAME
set-option -g update-environment -r
#set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM"
# copy mode to escape key
unbind-key [
bind-key Escape copy-mode
# splitting
unbind-key %
unbind-key '"'
bind-key | split-window -h -c "#{pane_current_path}" # horizontal split
bind-key - split-window -v -c "#{pane_current_path}" # vertical split
# window title
set-option -g set-titles on
set-option -g set-titles-string '#S:#I.#P #W' # window number,program name,active (or not)
set-window-option -g automatic-rename on # auto name
set-window-option -g automatic-rename-format '#T'
# No visual activity
set-option -g visual-activity off
set-option -g visual-bell off
# status bar
set-window-option -g monitor-activity on
source-file $HOME/dotfiles/tmuxline.conf
# Fn keys selection
bind-key -n F1 select-window -t :1
bind-key -n F2 select-window -t :2
bind-key -n F3 select-window -t :3
bind-key -n F4 select-window -t :4
bind-key -n F5 select-window -t :5
bind-key -n F6 select-window -t :6
bind-key -n F7 select-window -t :7
bind-key -n F8 select-window -t :8
bind-key -n F9 new-window
bind-key -n F10 detach-client
bind-key -n F11 previous-window
bind-key -n F12 next-window
# mkdir -p ~/.tmux/plugins/tpm
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'noscript/tmux-mighty-scroll'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @mighty-scroll-show-indicator on
set -g @mighty-scroll-select-pane off
set -g @mighty-scroll-interval 4
setenv -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.tmux/plugins/"
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'mkdir -p ~/.tmux/plugins/tpm && \
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && \
~/.tmux/plugins/tpm/bin/install_plugins'"
# keep at very bottom
run '~/.tmux/plugins/tpm/tpm'