2018-03-10 04:04:29 +00:00
|
|
|
# Rebind prefix to `
|
|
|
|
unbind C-b
|
|
|
|
set-option -g prefix `
|
|
|
|
bind-key ` send-prefix
|
|
|
|
# Rebind split to - and |
|
|
|
|
unbind '"'
|
|
|
|
unbind %
|
|
|
|
bind | split-window -h
|
|
|
|
bind - split-window -v
|
|
|
|
# Bind config reloading
|
2018-07-04 14:19:07 +00:00
|
|
|
bind r source-file ~/.tmux.conf \; display-message 'Config reloaded...'
|
|
|
|
|
|
|
|
# Escape delay is anoying in vim
|
|
|
|
set -s escape-time 0
|
|
|
|
|
2018-03-10 04:04:29 +00:00
|
|
|
# Mouse
|
|
|
|
set -g mouse on
|
|
|
|
|
2018-11-22 19:58:46 +00:00
|
|
|
# tmux-256-color is badly supported on some system, especially servers so we pretend to be screen instead
|
2018-07-04 14:19:07 +00:00
|
|
|
set -g default-terminal 'screen-256color'
|
|
|
|
set -ga terminal-overrides ',screen-256color:Tc'
|
2018-03-10 04:04:29 +00:00
|
|
|
|
|
|
|
# Window
|
|
|
|
set -g base-index 1
|
|
|
|
|
|
|
|
# Pane
|
|
|
|
setw -g pane-base-index 1
|
|
|
|
setw -g allow-rename off
|
2018-07-04 14:19:07 +00:00
|
|
|
set -g pane-border-fg 'colour7'
|
|
|
|
set -g pane-active-border-fg 'colour5'
|
2018-03-10 04:04:29 +00:00
|
|
|
|
|
|
|
# Status bar
|
|
|
|
set -g status-position top
|
2018-07-04 14:19:07 +00:00
|
|
|
set -g status-bg 'default'
|
2018-03-10 04:04:29 +00:00
|
|
|
|
2018-07-04 14:19:07 +00:00
|
|
|
setw -g window-status-fg 'colour7'
|
|
|
|
setw -g window-status-bg 'default'
|
|
|
|
setw -g window-status-format ' #I:#W'
|
2018-03-10 04:04:29 +00:00
|
|
|
|
2018-07-04 14:19:07 +00:00
|
|
|
setw -g window-status-current-fg 'colour15'
|
|
|
|
setw -g window-status-current-bg 'default'
|
|
|
|
setw -g window-status-current-format ' [#I:#W]'
|
2018-03-10 04:04:29 +00:00
|
|
|
|
|
|
|
setw -g window-status-activity-attr bold
|
|
|
|
|
2018-07-04 14:19:07 +00:00
|
|
|
set -g status-left-fg 'colour7'
|
2018-03-10 04:04:29 +00:00
|
|
|
set -g status-left '{#[fg=colour6]#S#[fg=default]}'
|
|
|
|
|
|
|
|
set -g status-right-length 100
|
2018-07-04 14:19:07 +00:00
|
|
|
set -g status-right-fg 'colour7'
|
2018-12-03 16:25:13 +00:00
|
|
|
set -g status-right '#U@#H'
|
2018-11-22 19:58:46 +00:00
|
|
|
|
|
|
|
# Plugins
|
|
|
|
# Resurect pane content
|
|
|
|
set -g @resurrect-capture-pane-contents 'on'
|
|
|
|
|
|
|
|
# Also resurect the vim session
|
2018-12-07 00:25:18 +00:00
|
|
|
set -g @resurrect-strategy-vim 'session' # for vim
|
|
|
|
set -g @resurrect-strategy-nvim 'session' # for neovim
|
|
|
|
# additional process to restore
|
|
|
|
set -g @resurrect-processes 'ssh watch'
|
2018-11-22 19:58:46 +00:00
|
|
|
|
|
|
|
# Save every 5 minutes
|
|
|
|
set -g @continuum-save-interval '5'
|
|
|
|
|
|
|
|
# Restore on session start
|
|
|
|
set -g @continuum-restore 'on'
|
2018-03-10 04:04:29 +00:00
|
|
|
|
2018-11-22 18:54:06 +00:00
|
|
|
# List of plugins
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
2018-12-03 16:25:13 +00:00
|
|
|
set -g @plugin 'soyuka/tmux-current-pane-hostname'
|
|
|
|
set -g @plugin 'christoomey/vim-tmux-navigator'
|
2018-11-22 19:58:46 +00:00
|
|
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
2018-12-07 00:25:18 +00:00
|
|
|
#set -g @plugin 'tmux-plugins/tmux-continuum'
|
|
|
|
set -g @plugin 'git@github.com:badjware/tmux-continuum.git'
|
2018-11-22 18:54:06 +00:00
|
|
|
|
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
|
|
run -b '~/.tmux/plugins/tpm/tpm'
|