-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
116 lines (95 loc) · 3.36 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
# Sane keybinding
# (handled by tmux-sensible)
# TODO - remove if tmux-sensible works well
# unbind C-b
set-option -g prefix C-a
# bind C-a send-prefix
# TODO - remove if tmux-sensible works well
# set -g escape-time 10
# OS X clipboard
# (handled by tmux-sensible)
# Config refresh
# (handled by tmux-sensible)
# History
# (handled by tmux-sensible)
# Appearance
set-option -g status-style fg=white,bg=colour234
set-option -g window-status-activity-style bold
set-option -g pane-border-style fg=colour245
set-option -g pane-active-border-style fg=colour39
set-option -g message-style fg=colour16,bg=colour221,bold
set-window-option -g window-status-current-style bg=colour162,fg=colour79
set-option -g set-titles on
# Turn the mouse on, but without copy mode dragging
set -g mouse on
unbind -n MouseDrag1Pane
unbind -Tcopy-mode MouseDrag1Pane
# One-based window indexing
set-option -g base-index 1
set-window-option -g pane-base-index 1
# New window based on previous window path
unbind c
bind c new-window -c "#{pane_current_path}"
# EZ window splitting
unbind '"'
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Vimmy pane selection and copying
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Setup 'v' to begin selection as in Vim
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# # Update default binding of `Enter` to also use copy-pipe
# unbind -T copy-mode-vi Enter
# bind -T copy-mode-vi Enter copy-pipe "reattach-to-user-namespace pbcopy"
# Keys to toggle monitoring activity in a window and the synchronize-panes option
bind m set monitor-activity\; display 'monitor-activity #{?monitor-activity,on,off}'
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
# Vimmy pane resizing
unbind C-Left
bind -r C-h resize-pane -L
unbind C-Down
bind -r C-j resize-pane -D
unbind C-Up
bind -r C-k resize-pane -U
unbind C-Right
bind -r C-l resize-pane -R
# Reorder windows
bind-key -r C-S-Left swap-window -t -1
bind-key -r C-S-Right swap-window -t +1
# Window Selection
# (handled by tmux-sensible)
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
# Names tmux windows intelligently
set -g @plugin 'ofirgall/tmux-window-name'
# Sensible defaults, doesn't override existing manually set config
set -g @plugin 'tmux-plugins/tmux-sensible'
# Use "Magic Wormhole" to get things interactively from a remote system
set -g @plugin 'gcla/tmux-wormhole'
# Menu overlays
set -g @plugin 'jaclu/tmux-menus'
# Manage tmux environment w/ fzf
set -g @plugin 'sainnhe/tmux-fzf'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'
# Plugin - jaclu/tmux-menus
# Default keys:
# prefix + <
# prefix + >
set -g @menus_location_x 'C'
set -g @menus_location_y 'C'
# Plugin - ofirgall/tmux-window-name
set -g @tmux_window_name_shells "['zsh', 'bash', 'sh']"
set -g @tmux_window_dir_programs "['gcloud', 'mix', 'git', 'docker']"
set -g @tmux_window_name_ignored_programs "['reattach-to-user-namespace']"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'