# propagate titles to the window set -g set-titles on # Minimalist window title "0:bash" set -g set-titles-string "#I:#W" # show colors set -g default-terminal "screen-256color" # rename window to current process set-window-option -g automatic-rename on # this enables mouse selections and scroll wheel set -g mouse on # Update all bindings to integrate copy-buffer with macOS. # brew install reattach-to-user-namespace unbind-key -T copy-mode M-w bind-key -T copy-mode C-w send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" bind-key -T copy-mode Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" bind-key -T copy-mode MouseDragEnd1Pane send-keys -X stop-selection # I keep dragging when just selecting the window. unbind-key -T root MouseDrag1Pane # Double clicking selects the word also when not in copy-mode. bind-key -T root DoubleClick1Pane select-pane \; copy-mode \; send-keys -X select-word # Start new window on Ctrl-n. Mapped to Command-n in .alacritty.yml # This matches the behaviour of the Terminal app for starting new windows. bind-key -T root C-n new-window # C-o both cleans the screen and history. Mapped to Command-k in .alacritty.yml # This matches the behaviour of Terminal app to quickly clear all. bind-key -T root C-o send-keys C-l \; run-shell "sleep .3s" \; clear-history # Ctrl-Left/Right to cycle the windows bind-key -T root C-Left previous-window bind-key -T root C-Right next-window