Files
dotfiles/.config/tmux/tmux.conf
2020-04-23 14:50:36 +02:00

63 lines
1.9 KiB
Bash

set -g default-terminal "tmux-256color"
set -g mouse on
# Set C-a as new prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Split panes with > and <
unbind %
bind-key < split-window -v
unbind '"'
bind-key > split-window -h
# Change panes with Alt-<arrow>
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 with Alt-Shift-<arrow>
bind -n M-S-Left resize-pane -L
# Change installation location of plugins
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins/'
## Plugins
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-prefix-highlight'
# Capture pane content
set -g @resurrect-capture-pane-contents 'on'
# Change keybindings
set -g @resurrect-save 'C-s'
set -g @resurrect-restore 'C-s'
# Save session every 5 min
set -g @continuum-save-interval '5'
# Last saved environment is automatically restored when tmux is started.
set -g @continuum-restore 'on'
## Theming (inspired by https://github.com/Who23/dots/blob/21976e76644d8d9261ebdcf61733d2181a1612eb/tmux.conf)
set -g status-bg black
set -g status-fg white
# set -g status-right "Continuum status: #{continuum_status}"
set -g @prefix_highlight_fg 'black'
set -g @prefix_highlight_bg 'yellow'
set -g @prefix_highlight_output_prefix ' '
set -g @prefix_highlight_output_suffix ' '
set -g status-right "#{prefix_highlight}"
set -g status-left "#{prefix_highlight}"
set -g status-justify centre
set -g window-status-current-format "#[fg=yellow]#[fg=black]#[bg=yellow]#I #W#[fg=yellow]#[bg=black] "
set -g window-status-format "#[fg=brightblack]#[fg=white]#[bg=brightblack]#I #W#[fg=brightblack]#[bg=black] "
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.config/tmux/plugins/tpm/tpm'