# version 3.3, 2025-07-11

# scrolling with shift-pgup/pgdown
set -g terminal-overrides 'xterm*:smcup@:rmcup@'

# Ctrl-a A to rename
bind-key A command-prompt "rename-window '%%'"

# Ctrl-a a goes to beginning of line
bind-key a send-prefix

bind-key ? list-keys -a

bind-key M-w display-popup

# set -g default-terminal tmux
set -g default-terminal screen

set -g default-command bash

%hidden STATUS_LEFT_INITIAL="Open main menu with #{prefix} <Space>   Host: #h Session: #{session_name}   "
%hidden STATUS_LEFT="#{prefix} Host: #h Session: #{session_name}   "

# This setting will be overwritten by the first input of #{prefix} <Space>
set -g status-left "${STATUS_LEFT_INITIAL}"
set-option -g status-left-length 70

set -g status-right ''

set -g base-index 1

set -g display-time 0

set -g detach-on-destroy off

set -g allow-rename off

set -g automatic-rename off

set -g pane-border-status top

set -g pane-border-indicators both

set -g pane-border-format "Pane #{pane_index} (ID #{pane_id} TTY #{pane_tty}) #{?pane_active,active,inactive}#{?window_zoomed_flag, (zoomed),}#{?pane_synchronized, (synced),}#{?pane_marked, (marked),}#{?pane_input_off, (input disabled),}"

set -g pane-border-style fg=#777777

set-window-option -g window-status-current-style bg=white

set -g status-keys vi

set -g mode-keys vi

set -g lock-command vlock

#set-hook -g client-resized "source-file ~/.tmux.conf"
#set-hook -g window-resized "source-file ~/.tmux.conf"

bind-key -r S-up    resize-window -U 5
bind-key -r S-down  resize-window -D 5
bind-key -r S-left  resize-window -L 5
bind-key -r S-right resize-window -R 5

# COMMENT: source-file in addition to set-hook so that it is re-read on a config reload
source-file ~/.tmux.menus-common.conf
set-hook -g client-attached "source-file ~/.tmux.menus-common.conf"
set-hook -g client-resized  "source-file ~/.tmux.menus-common.conf"
