-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
.tmux.conf
89 lines (75 loc) · 2.69 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
# Ian's .tmux.conf
#
# Note for OSX & iTerm: Enable "Applications in terminal may access clipboard" setting in prefs.
#
# Use T as the leader key, not B
unbind "C-b"
set -g prefix "C-t"
bind "t" send-prefix
set -g bell-action none
set -g visual-bell off
set -g display-panes-time 2000
set -g mouse on
bind "C-d" detach
bind "C-t" last-window
# Disable right-click menu in tmux 3.0. It's cool but it interferes.
unbind -n MouseDown3Pane
# Join pane command - https://unix.stackexchange.com/a/14301/16225
# bind "g" command-prompt -p "Join pane from:" "join-pane -s ':%%'"
# bind "C-s" command-prompt -p "Send pane to:" "join-pane -t ':%%'"
# Vim-like bindings
setw -g mode-keys vi
bind "n" next-window
bind "p" previous-window
bind "C-n" next-window
bind "C-p" previous-window
bind "s" split-window -v
bind "v" split-window -h
bind "j" select-pane -D
bind "k" select-pane -U
bind "h" select-pane -L
bind "l" select-pane -R
bind -r "C-j" select-pane -D
bind -r "C-k" select-pane -U
bind -r "C-h" select-pane -L
bind -r "C-l" select-pane -R
bind "=" select-layout tiled
bind "!" break-pane
bind \; choose-tree
# Screen-like bindings
bind '"' choose-window
bind "A" command-prompt "rename-window '%%'"
bind "Escape" copy-mode
# Double clicking selects the word also when not in copy-mode.
bind-key -T root DoubleClick1Pane select-pane \; copy-mode \; send-keys -X select-word
# Colors - derived from Powerline Double Cyan by Jim Myhrberg
set -g status-interval 0
set -g status-fg colour240
set -g status-bg colour233
set -g status-left "#[fg=colour242] #(uname -n | cut -d. -f1) "
set -g status-right "#[fg=colour242]:#{session_name}:#{window_index}.#{pane_index} "
set -g window-status-format "#[bg=colour233,fg=colour240] ⋅#I⋅ #W "
set -g window-status-current-format "#[bg=colour233,fg=colour240,nobold] 《#I》#W #[fg=black,bg=colour233,nobold]"
set -g window-status-separator ""
set -g status-justify centre
set -g status-left-length 20
set -g status-right 20
set -g display-panes-colour colour233
set -g display-panes-active-colour colour245
set -g pane-active-border-style "bg=default fg=magenta"
set -g clock-mode-colour colour39
set -g clock-mode-style 24
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @continuum-restore 'on'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# Fix ssh agent when tmux is detached
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock