Files
hermes-config/tmux/tmux.conf
Alexander Whitestone b0caca4289 fix: mouse-select copies to system clipboard via pbcopy
Drag-select, y, or Enter in copy-mode all pipe to pbcopy.
Holding Option still bypasses tmux for native Terminal.app select.
2026-03-15 08:11:49 -04:00

58 lines
2.9 KiB
Bash

# ── Timmy Dev Environment ──────────────────────────────────────────────
# Source-controlled: gitea/rockachopa/hermes-config
# ── Prefix ─────────────────────────────────────────────────────────────
# Keep default Ctrl-b (Ctrl-a conflicts with shell line-start)
# ── General ────────────────────────────────────────────────────────────
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
set -g history-limit 50000
set -g mouse on
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -s escape-time 0
set -g focus-events on
# ── Status Bar ─────────────────────────────────────────────────────────
set -g status-position bottom
set -g status-style "bg=#1a1a2e,fg=#e0e0e0"
set -g status-left "#[bg=#6c5ce7,fg=#ffffff,bold] #S #[default] "
set -g status-left-length 20
set -g status-right "#[fg=#888888]%b %d %H:%M "
set -g status-right-length 30
setw -g window-status-format " #I:#W "
setw -g window-status-current-format "#[bg=#6c5ce7,fg=#ffffff,bold] #I:#W "
# ── Pane Borders ───────────────────────────────────────────────────────
set -g pane-border-style "fg=#333333"
set -g pane-active-border-style "fg=#6c5ce7"
set -g pane-border-status top
set -g pane-border-format " #{pane_title} "
# ── Copy / Paste ──────────────────────────────────────────────────────
# Mouse-select copies to system clipboard automatically
set -g set-clipboard on
setw -g mode-keys vi
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "pbcopy"
# ── Quality of Life ───────────────────────────────────────────────────
# Easier splits (keep old bindings too)
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Navigate panes with Alt+arrow (no prefix needed)
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
# Reload config
bind r source-file ~/.tmux.conf \; display "Config reloaded"
# New windows keep current path
bind c new-window -c "#{pane_current_path}"