73 lines
2.4 KiB
Bash
73 lines
2.4 KiB
Bash
# -----------------------------------------------------------------------------
|
|
# This config is targeted for tmux 3.0+.
|
|
#
|
|
# Read the "Plugin Manager" section (bottom) before trying to use this config!
|
|
# -----------------------------------------------------------------------------
|
|
|
|
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Global options
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Enable color support inside of tmux.
|
|
set-option -g default-terminal "tmux-256color"
|
|
set -ga terminal-overrides ",*256col*:Tc"
|
|
|
|
# Remove time delay when switching between vim modes
|
|
set -s escape-time 0
|
|
|
|
# Allow opening multiple terminals to view the same session at different sizes.
|
|
setw -g aggressive-resize on
|
|
|
|
# Ensure window titles get renamed automatically.
|
|
setw -g automatic-rename
|
|
|
|
# Ensure window index numbers get reordered on delete.
|
|
set-option -g renumber-windows on
|
|
|
|
# Start windows and panes index at 1, not 0.
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
|
|
# Enable full mouse support.
|
|
# set -g mouse on # gross gross gross
|
|
|
|
# vi mode for movement and copy/paste
|
|
set-window-option -g mode-keys vi
|
|
bind -T copy-mode-vi v send-keys -X begin-selection
|
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Key Binds
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Reload the tmux config.
|
|
bind-key r source-file /home/solomon/.config/tmux/tmux.conf \; display-message "tmux.conf reloaded"
|
|
|
|
# Split panes.
|
|
bind-key b split-window -v
|
|
bind-key v split-window -h
|
|
|
|
# Navigate panes.
|
|
bind-key -r h select-pane -L
|
|
bind-key -r j select-pane -D
|
|
bind-key -r k select-pane -U
|
|
bind-key -r l select-pane -R
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Plugin Manager - https://github.com/tmux-plugins/tpm
|
|
# Step 1) git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
|
# Step 2) Reload tmux if it's already started with `r
|
|
# Step 3) Launch tmux and hit `I (capital i) to fetch any plugins
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# List of plugins.
|
|
set -g @tpm_plugins ' \
|
|
tmux-plugins/tpm \
|
|
tmux-plugins/tmux-resurrect \
|
|
'
|
|
|
|
# Initialize TPM (keep this line at the very bottom of your tmux.conf).
|
|
run '~/.config//tmux/plugins/tpm/tpm'
|