-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
117 lines (93 loc) · 3.5 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
set -g prefix C-Space
# Prevent ctrl + k in Vim from closing current window
bind -n C-k send-keys C-k
# Relax!
set -sg escape-time 0
set -sg repeat-time 600
# Reload config
unbind r
bind r source-file ~/.tmux.conf
# Less stretching to get to the first item.
set -g base-index 1
setw -g pane-base-index 1
# Quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# Use vim keybindings in status mode
set -g status-keys vi
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Toggle status bar
bind S set-option status
# Vim visual selection and yank when in copy mode
bind Space copy-mode
bind C-Space copy-mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi Escape send-keys -X cancel
unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode after dragging with mouse
# After we have something yanked back in Vim we can paste our yanked selection
# anywhere we are in insert mode with (prefix p). This works in the vim buffer,
# search and fuzzy finder buffer for example
bind p paste-buffer
# More straight forward key bindings for splitting
unbind %
bind | split-window -h
bind h split-window -h
unbind '"'
bind - split-window -v
bind v split-window -v
# Moving between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Pane resizing
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Terminal emulator window title
set -g set-titles on
set -g set-titles-string '#S:#I.#P #W'
# Terminal colors
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# Move status bar to the top
set-option -g status-position top
# Status bar settings
# set -g status-left-length 50
# set -g status-right-length 150
# set -g status-interval 5
# set -g status-left " #(whoami)@#h | #[fg=$white,bold]#I.#P #{prefix_highlight}| "
# set -g status-right "#{battery_percentage} (#{battery_remain}) #{online_status} P:#{maildir_counter_1} G:#{maildir_counter_2} W:#{maildir_counter_3} | %A %d/%m/%y %H:%M"
# set -g status-justify left # center align window list
# set -g window-status-format "#[fg=white] #I.#W "
# set -g window-status-current-format "#[fg=$onedark_green,noreverse,bold] #I.#W "
# Activity
setw -g monitor-activity on
set -g visual-activity on
# Autorename sanely.
setw -g automatic-rename on
# Better name management
bind c new-window
bind , command-prompt "rename-window '%%'"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator' # for navigating panes and vim/nvim with Ctrl-hjkl
set -g @plugin 'jimeh/tmux-themepack' # to configure tmux theme
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-sidebar'
# Plugin Settings
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on' # allow tmux-ressurect to capture pane contents
set -g @themepack 'powerline/default/gray' # use this theme for tmux
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'