diff --git a/.tmux.conf b/.tmux.conf index a51b86f..0757877 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -32,7 +32,11 @@ set -g @man-shell-interactive 'off' # Tmux system configuration set-option -gq display-time "2600" -set -g default-terminal "xterm-256color" +# Try to solve problem with vim colors +# True colors (via: https://jdhao.github.io/2018/10/19/tmux_nvim_true_color/ ) +set -g default-terminal "screen-256color" +# tell Tmux that outside terminal supports true color +set -ag terminal-overrides ",alacritty:RGB" # --- START colours superhero --- diff --git a/.tmux.light.conf b/.tmux.light.conf index 27e818d..279c7cc 100644 --- a/.tmux.light.conf +++ b/.tmux.light.conf @@ -16,7 +16,8 @@ set -g @man-size '40%' set -g @man-orientation 'h' set -g @man-shell-interactive 'off' -set -g default-terminal "xterm-256color" +set -g default-terminal "screen-256color" +set -ag terminal-overrides ",alacritty:RGB" # switch panes using Alt-arrow without prefix bind -n M-Left select-pane -L diff --git a/.tmux.resurrect-only.conf b/.tmux.resurrect-only.conf new file mode 100644 index 0000000..ad16736 --- /dev/null +++ b/.tmux.resurrect-only.conf @@ -0,0 +1,46 @@ +# Tmux configuration for root +# - Mouse enabled +# - Plugins via TPM +# - tmux-resurrect for save/restore sessions + +# Enable 256 colors and sane defaults +set -g default-terminal "screen-256color" +set -as terminal-overrides ',xterm-256color:RGB' + +# Enable mouse support (scroll, select panes, resize) +set -g mouse on + +# Faster command sequences +set -s escape-time 0 + +# Status bar tweaks +set -g status-interval 5 +set -g status-keys vi +setw -g mode-keys vi + +# Split shortcuts +bind | split-window -h +bind - split-window -v +unbind '"' +unbind % + +# Reload config +bind r source-file ~/.tmux.conf \; display-message "Reloaded ~/.tmux.conf" + +# ---------------------------------------------------------------------------- +# Tmux Plugin Manager (TPM) and plugins +# ---------------------------------------------------------------------------- +# TPM repo +set -g @plugin 'tmux-plugins/tpm' +# Session save/restore +set -g @plugin 'tmux-plugins/tmux-resurrect' + +# tmux-resurrect settings +set -g @resurrect-capture-pane-contents 'on' +set -g @resurrect-dir '~/.tmux/resurrect' +# Uncomment if you want automatic periodic saves with tmux-continuum +# set -g @plugin 'tmux-plugins/tmux-continuum' +# set -g @continuum-restore 'on' + +# Initialize TPM (keep this line at the very bottom of tmux.conf) +run -b '~/.tmux/plugins/tpm/tpm'