Newer
Older
ops-toolkit / packs / tmux / files / tmux.conf
# ops-toolkit team baseline tmux configuration
#
# Managed by ops-toolkit (packs/tmux) as a SYMLINK: do not edit this file in
# place at ~/.tmux.conf -- your edits would land in the shared repo copy.
# Personal overrides go in ~/.tmux.conf.local, sourced near the end.
# Reload after changes: prefix + r
# ASCII + LF.

# ---------------------------------------------------------------- general ---
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
set -g history-limit 50000
set -sg escape-time 10
set -g display-time 4000
set -g mouse on
set -g focus-events on
setw -g mode-keys vi

# Window/pane numbering: start at 1, keep contiguous
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on

# Terminal titles (useful when several jumphost windows are open)
set -g set-titles on
set -g set-titles-string "#S:#W #{host_short}"

# ----------------------------------------------------------------- prefix ---
# The prefix stays at the tmux default (C-b), deliberately. The common C-a
# rebind shadows readline beginning-of-line, which ops shells use constantly.
# If you prefer C-a anyway, rebind it in ~/.tmux.conf.local.

# ------------------------------------------------------------ keybindings ---
# Reload this config
bind r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"

# New panes/windows open in the current pane's working directory
bind '"' split-window -c "#{pane_current_path}"
bind %   split-window -h -c "#{pane_current_path}"
bind c   new-window -c "#{pane_current_path}"

# ---------------------------------------------------------------- activity --
setw -g monitor-activity on
set -g visual-activity off

# ----------------------------------------------------------------- status ---
# Minimal baseline. Heavier status frameworks (powerline etc.) are a personal
# choice: enable them in ~/.tmux.conf.local, not here.
set -g status-interval 5
set -g status-left-length 30
set -g status-left "[#S] "
set -g status-right "#{prefix_highlight} #H %Y-%m-%d %H:%M"

# ---------------------------------------------------------------- plugins ---
# Managed by TPM (installed by packs/tmux/install-030-tpm.sh).
# Inside tmux: prefix + I installs/updates the plugins listed here.
# This list is the team-blessed set; it mirrors packs/tmux/plugins.list.
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'

# ---------------------------------------------------------- local override --
# Never shipped or touched by the toolkit. Safe place for personal settings.
if-shell "test -f ~/.tmux.conf.local" "source-file ~/.tmux.conf.local"

# TPM bootstrap -- keep this line LAST (guarded so the config still loads
# before TPM has been installed).
if-shell "test -d ~/.tmux/plugins/tpm" "run '~/.tmux/plugins/tpm/tpm'"