-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
148 lines (109 loc) · 3.75 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Configuration {{{
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Windows and pane numbering start at 1
set -g base-index 1
setw -g pane-base-index 1
# 0 moves to window 10 (as windows start numbering at 1)
bind 0 select-window -t :10
# When a window closes, they are renumbered appropriately
set -g renumber-windows on
# Pass xterm-style keys, many key combinations should work as expected
setw -g xterm-keys on
# Don't display 'Activity in windows X' messages
set -g visual-activity off
# Set vi-style keys
set -g status-keys vi
setw -g mode-keys vi
# Reduce delay between esc and subsequent chars
set -sg escape-time 1
# Assume terminal supports 356 colours
set -g default-terminal "screen-256color"
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse-select-window on
set -g mouse-select-pane on
set -g mouse-resize-pane on
# don't rename windows automatically
set-option -g allow-rename off
# }}}
# {{{ Key bindings
# Existing bindings:
# Detatch session: d
# Swap current pane with previous: {
# Swap current pane with next: }
# Create a new window: c
# Choose Tree (switch between session/window/pane via a tree view): w
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# switch panes using Alt-arrow without prefix
# NOTE: 'M' is for Meta key, currently assigned to 'alt'
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Resize panes using PREFIX H, J, K, L. Use Vim bindings
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# Rearrange window order with < and >
bind -r < swap-window -t -1
bind -r > swap-window -t +1
# When renaming windows and sessions, don't autofill with old name
bind , command-prompt -p "(rename-window '#W')" "rename-window '%%'"
bind '$' command-prompt -p "(rename-session '#S')" "rename-session '%%'"
bind-key x confirm-before 'kill-pane' # already default
bind-key X confirm-before 'kill-window'
bind-key C-X confirm-before 'kill-session'
bind-key C-X confirm-before 'kill-session'
# By default C-b <Space> to cycle all pane layout options
bind-key Space select-layout even-horizontal # Normally next-layout
bind-key C-space next-layout
# }}}
# {{{ Plugins
# Github repos can be found for these plugins as they follow the convention: <owner>/<repo>
set -g @plugin 'jaclu/tmux-power-zoom'
# `<prefix> Z` will zoom the pane to a new window and restore it.
# This makes working with zoomed panes much easier.
set -g @plugin 'jaclu/tmux-menus'
# `<prefix> \` will show a menu of useful commands.
# }}}
# {{{ Theme
source ~/.tmux/themes/colours1.tmux
## Dracula
# set -g @plugin 'dracula/tmux'
# set -g @dracula-show-powerline true
## OneDark
# set -g @plugin 'odedlaz/tmux-onedark-theme'
# set -g @onedark_date_format "%y/%m/%d"
## Nord
# set -g @plugin "arcticicestudio/nord-tmux"
## Powerline
# set -g @plugin 'wfxr/tmux-power'
# set -g @tmux_power_theme 'moon'
## Another Powerline
# set -g @plugin 'jimeh/tmux-themepack'
# set -g @themepack 'powerline/block/blue'
## Gruvbox
set -g @plugin 'egel/tmux-gruvbox'
set -g @tmux-gruvbox 'dark' # or 'light'
# Indicate when the panes are synced on the status bar
#[reverse,blink]#{?pane_synchronized,*** PANES SYNCED! ***,}#[default]
# }}}
# Run tpm
run '~/.tmux/plugins/tpm/tpm'
# When in tmux run the following commands:
# `c-a I` to install plugins
# `c-a U` to update plugins
# `c-a <alt> u` to uninstall plugins
# config for this file only
# vim:foldmethod=marker:foldlevel=0:foldminlines=0