# Tmux Configuration - Mouse enabled # Generated for better terminal multiplexing experience # Enable mouse support (scroll, pane selection, resizing) set -g mouse on # Set default terminal set -g default-terminal "screen-256color" # Improve colors set -g default-command "${SHELL}" # Status bar configuration set -g status-interval 1 set -g status-left-length 30 set -g status-right-length 50 set -g status-left "[#S] " set -g status-right "#{?client_prefix,#[reverse]#[noreverse] ,}#H | %Y-%m-%d %H:%M" # Split panes using | and - bind | split-window -h bind - split-window -v unbind '"' unbind % # Reload config with prefix + r bind r source-file ~/.tmux.conf \; display "Config reloaded!" # Copy mode improvements setw -g mode-keys vi set -g history-limit 10000 # Better split keybindings bind-key h select-pane -L bind-key j select-pane -D bind-key k select-pane -U bind-key l select-pane -R # Set escape time for faster command sequences set -sg escape-time 0 # Mouse scroll in copy mode bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'" bind -n WheelDownPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M'" # Double click to select pane bind-key -T root DoubleClick1Pane select-pane -t = \; copy-mode -e # Enable scroll with mouse wheel without entering copy mode set -g terminal-overrides 'xterm*::smcup@:rmcup@' # Alternative scroll settings for better compatibility set -g @scroll-speed-num-lines-per-scroll 1 # Enable focus events set -g focus-events on # ======================================== # 🎨 VISUAL ENHANCEMENTS # ======================================== # Better colors and visual indicators set -g pane-border-style fg=colour238 set -g pane-active-border-style fg=green set -g message-style bg=black,fg=green,bold set -g status-style bg=black,fg=green set -g status-justify centre # Enhanced status bar set -g status-left "#[fg=cyan]● #[fg=white]%H:%M:%S #[fg=green]● #[fg=cyan]%d-%b-%y" set -g status-right "#[fg=yellow]%a #[fg=white]%I:%M %p #[fg=cyan]| #[fg=yellow]#H" # Show activity in other windows setw -g monitor-activity on set -g visual-activity off # ======================================== # ⌨️ PRODUCTIVITY SHORTCUTS # ======================================== # Quick pane navigation with Alt+arrow keys 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 more easily bind -r H resize-pane -L 5 bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5 # Quick window switching bind -r C-h previous-window bind -r C-l next-window # Kill pane/window shortcuts bind x kill-pane bind X kill-window # ======================================== # 📋 COPY/PASTE ENHANCEMENTS # ======================================== # Better copy mode set -g set-clipboard on bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel bind-key -T copy-mode-vi r send-keys -X rectangle-toggle # Paste with prefix + p bind p paste-buffer # ======================================== # 🔄 SESSION MANAGEMENT # ======================================== # Quick session switching bind-key s choose-tree -Zs # New window with current path bind c new-window -c "#{pane_current_path}" # ======================================== # 🎯 WINDOW & PANE MANAGEMENT # ======================================== # Start windows and panes at 1, not 0 set -g base-index 1 setw -g pane-base-index 1 # Renumber windows automatically set -g renumber-windows on # Aggressive resize (for synchronized panes) setw -g aggressive-resize on # ======================================== # 📊 UTILITIES # ======================================== # Display time for messages set -g display-time 1500 # History size set -g history-limit 50000 # Disable auto-renaming windows set-option -g allow-rename off # Mouse-only selection and copy unbind -T copy-mode-vi MouseDragEnd1Pane # ======================================== # 🔧 ADVANCED SETTINGS # ======================================== # Don't exit tmux when closing last window set -g detach-on-destroy off # Better command completion set -g command-alias []