-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_tmux.conf.tmpl
85 lines (68 loc) · 2.83 KB
/
dot_tmux.conf.tmpl
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
#------------------------------------------------------------------------------
# Options
#------------------------------------------------------------------------------
set-option -g default-terminal "screen-256color"
set-option -g status-position top
{{ if .mouse_mode }}
set-option -g mouse on
{{ end }}
set-option -g renumber-windows on
set -g base-index 1
set -s set-clipboard on
setw -g pane-base-index 1
#------------------------------------------------------------------------------
# Plugins
#------------------------------------------------------------------------------
set -g @plugin 'hallazzang/tmux-reset'
set -g @plugin 'tmux-plugins/tpm'
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-yank'
set -g @plugin 'aserowy/tmux.nvim'
#------------------------------------------------------------------------------
# Ressurect Options
#------------------------------------------------------------------------------
## Restore Vim sessions
set -g @resurrect-strategy-vim 'session'
## Restore Neovim sessions
set -g @resurrect-strategy-nvim 'session'
## Restore Panes
set -g @resurrect-capture-pane-contents 'on'
## Restore last saved environment (automatically)
set -g @continuum-restore 'on'
set -g @continuum-save-interval '5'
#------------------------------------------------------------------------------
# Themes
#------------------------------------------------------------------------------
set -g @plugin 'egel/tmux-gruvbox'
set -g @tmux-gruvbox 'dark' # or 'light'''''''
#------------------------------------------------------------------------------
# Keybindings
#---------------r--------------------------------------------------------------
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind c new-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# use arrow bracket to swap windows
# https://superuser.com/questions/343572/how-do-i-reorder-tmux-windows
#bind "<" swap-pane -d -t -1
#bind ">" swap-pane -d -t +1
# vim keys for switchign to window
bind -n "l"
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
#------------------------------------------------------------------------------
# Installations
#------------------------------------------------------------------------------
# install tpm if not already on machine
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'